complete file path

Hi!

Can somebody tell me exactly what a
“complete NT filepath” means?

concreetly: if I use something like

SysHandle = CreateFile(
“\\?\d:\wallpaper.bmp”,
GENERIC_READ, FILE_SHARE_READ,
NULL, OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL, NULL );

works fine unsder User mode, but
under Kernel mode,

ObjectAttributes.Length = sizeof(OBJECT_ATTRIBUTES);
ObjectAttributes.ObjectName = &(SourceName);
ObjectAttributes.RootDirectory = NULL;
ObjectAttributes.SecurityDescriptor = NULL;
ObjectAttributes.SecurityQualityOfService = NULL;
ObjectAttributes.Attributes = 0x0;

Status = ZwOpenFile(
&SourceHandle,
FileHandle,
GENERIC_READ,
DesiredAccess,
&ObjectAttributes,
POBJECT_ATTRIBUTES ObjectAttributes,
&IoStatusBlock,
PIO_STATUS_BLOCK IoStatusBlock,
FILE_SHARE_READ,
FILE_NON_DIRECTORY_FILE
);

says always “The filename, directory name,
or volume label syntax is incorrect.”

and I initialize SourceName to the same,
as above, “\\?\d:\wallpaper.bmp”.

why is that?

thanks,
Sandor


Do you want a free e-mail for life ? Get it at http://www.kolozsvar.ro/


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

IIRC, \?\ is used to tell WIN32 not to parse the path. In kernel mode,
it should be ??\ (i.e. \??\ in C:-)

Regards, Dejan.

Lukacs Sandor wrote:

Hi!

Can somebody tell me exactly what a
“complete NT filepath” means?

concreetly: if I use something like

SysHandle = CreateFile(
“\\?\d:\wallpaper.bmp”,
GENERIC_READ, FILE_SHARE_READ,
NULL, OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL, NULL );

works fine unsder User mode, but
under Kernel mode,

ObjectAttributes.Length = sizeof(OBJECT_ATTRIBUTES);
ObjectAttributes.ObjectName = &(SourceName);
ObjectAttributes.RootDirectory = NULL;
ObjectAttributes.SecurityDescriptor = NULL;
ObjectAttributes.SecurityQualityOfService = NULL;
ObjectAttributes.Attributes = 0x0;

Status = ZwOpenFile(
&SourceHandle,
FileHandle,
GENERIC_READ,
DesiredAccess,
&ObjectAttributes,
POBJECT_ATTRIBUTES ObjectAttributes,
&IoStatusBlock,
PIO_STATUS_BLOCK IoStatusBlock,
FILE_SHARE_READ,
FILE_NON_DIRECTORY_FILE
);

says always “The filename, directory name,
or volume label syntax is incorrect.”

and I initialize SourceName to the same,
as above, “\\?\d:\wallpaper.bmp”.

why is that?

thanks,
Sandor


Do you want a free e-mail for life ? Get it at http://www.kolozsvar.ro/


You are currently subscribed to ntfsd as: xxxxx@alfasp.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


Kind regards, Dejan M. CEO Alfa Co. www.alfasp.com
E-mail: xxxxx@alfasp.com
ICQ#: 56570367
Professional file&system related components and libraries for Win32
developers.
Alfa File Monitor - #1 file monitoring system for Win32 developers.
Alfa File Protector - #1 file protection and hiding system for Win32
developers.
Alfa Units - #1 file and system handling units for Delphi.


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Must be:
??\d:\wallpaper.bmp

Two query characters, not one.

Max

----- Original Message -----
From: “Lukacs Sandor”
To: “File Systems Developers”
Sent: Sunday, September 23, 2001 11:50 PM
Subject: [ntfsd] complete file path

>
> Hi!
>
> Can somebody tell me exactly what a
> “complete NT filepath” means?
>
> concreetly: if I use something like
>
> SysHandle = CreateFile(
> “\\?\d:\wallpaper.bmp”,
> GENERIC_READ, FILE_SHARE_READ,
> NULL, OPEN_EXISTING,
> FILE_ATTRIBUTE_NORMAL, NULL );
>
> works fine unsder User mode, but
> under Kernel mode,
>
> ObjectAttributes.Length = sizeof(OBJECT_ATTRIBUTES);
> ObjectAttributes.ObjectName = &(SourceName);
> ObjectAttributes.RootDirectory = NULL;
> ObjectAttributes.SecurityDescriptor = NULL;
> ObjectAttributes.SecurityQualityOfService = NULL;
> ObjectAttributes.Attributes = 0x0;
>
> Status = ZwOpenFile(
> &SourceHandle,
> FileHandle,
> GENERIC_READ,
> DesiredAccess,
> &ObjectAttributes,
> POBJECT_ATTRIBUTES ObjectAttributes,
> &IoStatusBlock,
> PIO_STATUS_BLOCK IoStatusBlock,
> FILE_SHARE_READ,
> FILE_NON_DIRECTORY_FILE
> );
>
> says always “The filename, directory name,
> or volume label syntax is incorrect.”
>
> and I initialize SourceName to the same,
> as above, “\\?\d:\wallpaper.bmp”.
>
> why is that?
>
> thanks,
> Sandor
>
>
>
> ______________________________________________________________________
> Do you want a free e-mail for life ? Get it at http://www.kolozsvar.ro/
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com