How to refer to a remote file/directory by its object name

I am trying to open a directory from my FSD with the InitializeObjectAttributes() and FltCreateFile().

//
// Initialize the object attributes and open the file.
//

InitializeObjectAttributes( &objectAttributes,
&fileName,
OBJ_KERNEL_HANDLE,
NULL,
NULL );

status = FltCreateFile(MiniSpyData.Filter,
NULL,
&Fhandle,
FILE_TRAVERSE|FILE_LIST_DIRECTORY,
&objectAttributes,
&Fstatus,
(PLARGE_INTEGER)
NULL,
FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
FILE_OPEN,
FILE_DIRECTORY_FILE,
NULL,
0L,
0);
if (status == STATUS_SUCCESS) {

Sorry, the post went out too soon when I hit a wrong key.
Here is the full text.
I am trying to open a directory from my FSD with the
InitializeObjectAttributes() and FltCreateFile() call.

The codes seem to work with a local directory with the path
name like,
\Dosdevices\C:\Brother

But I can’t open a remote directory with path name like,

\TPS100\SharedDocs

What is proper path name for a remote directory?

I then tried \Device\LanmanRedirector\TPs100\SharedDocs, it
seems to work. But I am not sure that is proper path name for
referring a remote directory/file. I’d appreciate if you can
point me to the docs that discuss the right path name or object
name for both local and remote file/directory.
Thanks,

John W.

I am trying to open a directory from my FSD with the
InitializeObjectAttributes() and FltCreateFile().

//
// Initialize the object attributes and open the file.
//

InitializeObjectAttributes( &objectAttributes,
&fileName,
OBJ_KERNEL_HANDLE,
NULL,
NULL );

status = FltCreateFile(MiniSpyData.Filter,
NULL,
&Fhandle,
FILE_TRAVERSE|FILE_LIST_DIRECTORY,
&objectAttributes,
&Fstatus,
(PLARGE_INTEGER)
NULL,
FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
FILE_OPEN,
FILE_DIRECTORY_FILE,
NULL,
0L,
0);
if (status == STATUS_SUCCESS) {


NTFSD is sponsored by OSR

For our schedule of debugging and file system seminars
(including our new fs mini-filter seminar) visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

John W.

Twin Peaks Software
Innovation for business continuity
E-mail: xxxxx@TwinPeakSoft.com
Tel: (510) 438-0536

\Device\Lanmanredirector\fooServer\barShare will work for CIFS shares. Each
network redirector has its own “\Device<network redirector device name>”
stuff.

Regards,
Ayush Gupta
AI Consulting.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of John Wong
Sent: Wednesday, March 31, 2010 3:24 AM
To: Windows File Systems Devs Interest List
Subject: Re: [ntfsd] How to refer to a remote file/directory by its object
name

Sorry, the post went out too soon when I hit a wrong key.
Here is the full text.
I am trying to open a directory from my FSD with the
InitializeObjectAttributes() and FltCreateFile() call.

The codes seem to work with a local directory with the path
name like,
\Dosdevices\C:\Brother

But I can’t open a remote directory with path name like,

\TPS100\SharedDocs

What is proper path name for a remote directory?

I then tried \Device\LanmanRedirector\TPs100\SharedDocs, it
seems to work. But I am not sure that is proper path name for
referring a remote directory/file. I’d appreciate if you can
point me to the docs that discuss the right path name or object
name for both local and remote file/directory.
Thanks,

John W.

> I am trying to open a directory from my FSD with the
> InitializeObjectAttributes() and FltCreateFile().
>
> //
> // Initialize the object attributes and open the file.
> //
>
> InitializeObjectAttributes( &objectAttributes,
> &fileName,
> OBJ_KERNEL_HANDLE,
> NULL,
> NULL );
>
> status = FltCreateFile(MiniSpyData.Filter,
> NULL,
> &Fhandle,
> FILE_TRAVERSE|FILE_LIST_DIRECTORY,
> &objectAttributes,
> &Fstatus,
> (PLARGE_INTEGER)
> NULL,
> FILE_ATTRIBUTE_NORMAL,
>
FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
> FILE_OPEN,
> FILE_DIRECTORY_FILE,
> NULL,
> 0L,
> 0);
> if (status == STATUS_SUCCESS) {
>
> —
> NTFSD is sponsored by OSR
>
> For our schedule of debugging and file system seminars
> (including our new fs mini-filter seminar) visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

John W.

Twin Peaks Software
Innovation for business continuity
E-mail: xxxxx@TwinPeakSoft.com
Tel: (510) 438-0536


NTFSD is sponsored by OSR

For our schedule of debugging and file system seminars
(including our new fs mini-filter seminar) visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer