The file object name being opened should be “\WINDOWS” which in your case is
relative to the FileSystem volume specified by:
devExt->AttachedToDeviceObject. The device name path is not allowed at this
level.
/ted
-----Original Message-----
From: Dana Epp [mailto:xxxxx@vulscan.com]
Sent: Wednesday, August 04, 2004 3:27 PM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] IoCreateFileSpecifyDeviceObjectHint returning
STATUS_OBJECT_PATH_SYNTAX_BAD
Under the assumption that Neal is going to find a viable solution for the
hotfix I have begun to write the required code to handle the
IoCreateFileSpecifyDeviceObjectHint and find I really don’t quite know how
to use this function properly.
I seem to always get a return of STATUS_OBJECT_PATH_SYNTAX_BAD, and from the
docs I am guessing it is because my CreateOptions and Dispositions are
wrong.
The below snippet has “\Device\HarddiskVolume1\WINDOWS” as tokenStr, and I
wish to open the directory so I can get the handle to make my FileObject and
then pass it to my routine doing the directory query IRP. Can anyone tell me
what causes the STATUS_OBJECT_PATH_SYNTAX_BAD to be returned?
InitializeObjectAttributes(
&attributes,
&tokenStr,
OBJ_KERNEL_HANDLE | OBJ_CASE_INSENSITIVE,
NULL,
NULL );
status = IoCreateFileSpecifyDeviceObjectHint(
&handle, // File Handle
GENERIC_READ, // Desired Access
&attributes, // Attributes
&iosb, // IO Status Block
NULL, // Allocation size
FILE_ATTRIBUTE_DIRECTORY, // File attributes
FILE_SHARE_READ,
FILE_OPEN, // Create disposition
FILE_DIRECTORY_FILE, // Create options
NULL, // EA buffer
0, // EA size
CreateFileTypeNone, // CreateFileType
NULL, // Extra create parameters
0, // Options
devExt->AttachedToDeviceObject // Device object to use for open
);
–
Regards,
Dana Epp
[Blog: http://silverstr.ufies.org/blog/]
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@livevault.com To unsubscribe
send a blank email to xxxxx@lists.osr.com