IoCreateFileSpecifyDeviceObjectHint open network drive problem

Hi,all

I am trying to open a file in a network share with
IoCreateFileSpecifyDeviceObjectHint.
It doesn’t work, return the status “STATUS_OBJECT_PATH_NOT_FOUND”, the code
as following, anyone know why?

Thanks in advance.

Bin

RtlInitUnicodeString( &testName,L"\172.11.11.138\test\test1.txt");
//RtlInitUnicodeString(&tempName, L"\??\c:\test\file0.txt"); works fine
for this one
InitializeObjectAttributes(&ObjectAttributes,
&testName, OBJ_KERNEL_HANDLE |
OBJ_CASE_INSENSITIVE, NULL, NULL );
status = IoCreateFileSpecifyDeviceObjectHint( &FileHandle, // File
Handle
FILE_READ_ATTRIBUTES, // Desired Access
&ObjectAttributes, // Attributes
&IoStatus, // IO Status Block
NULL, // Allocation size
FILE_ATTRIBUTE_NORMAL, // File attributes
FILE_SHARE_DELETE,
FILE_OPEN, // Create disposition
FILE_NON_DIRECTORY_FILE, // Create options
NULL, // EA buffer
0, // EA size
CreateFileTypeNone, // CreateFileType
NULL, // Extra create parameters
IO_IGNORE_SHARE_ACCESS_CHECK,
DevExt->NLExtHeader.AttachedToDeviceObject // Device object
to use for open
);

The name is not valid. If you want this processed by a specific
redirector, try prepending the device name of the redirector. If you
want to query all of the available redirectors, try prepending
“\Device\UNC” to the name.

Regards,

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com

Looking forward to seeing you at the next OSR File Systems class in
Boston, MA April 18-21, 2006 (note new date - MS scheduled plugfest the
same week again.)

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Bin Zeng
Sent: Thursday, March 02, 2006 4:30 PM
To: ntfsd redirect
Subject: [ntfsd] IoCreateFileSpecifyDeviceObjectHint open network drive
problem

Hi,all

I am trying to open a file in a network share with
IoCreateFileSpecifyDeviceObjectHint.
It doesn’t work, return the status “STATUS_OBJECT_PATH_NOT_FOUND”, the
code
as following, anyone know why?

Thanks in advance.

Bin

RtlInitUnicodeString( &testName,L"\172.11.11.138\test\test1.txt");
//RtlInitUnicodeString(&tempName, L"\??\c:\test\file0.txt"); works
fine
for this one
InitializeObjectAttributes(&ObjectAttributes,
&testName,
OBJ_KERNEL_HANDLE |
OBJ_CASE_INSENSITIVE, NULL,
NULL );
status = IoCreateFileSpecifyDeviceObjectHint(
&FileHandle, // File
Handle
FILE_READ_ATTRIBUTES, // Desired Access
&ObjectAttributes, // Attributes
&IoStatus, // IO Status Block
NULL, // Allocation size
FILE_ATTRIBUTE_NORMAL, // File attributes
FILE_SHARE_DELETE,
FILE_OPEN, // Create disposition
FILE_NON_DIRECTORY_FILE, // Create options
NULL, // EA buffer
0, // EA size
CreateFileTypeNone, // CreateFileType
NULL, // Extra create parameters
IO_IGNORE_SHARE_ACCESS_CHECK,
DevExt->NLExtHeader.AttachedToDeviceObject // Device
object
to use for open

);


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@osr.com
To unsubscribe send a blank email to xxxxx@lists.osr.com