RE: Opening a file through a shadow device from user mode .

win32 calls accept paths which are relative to ??\ directory. Try opening
the file using volume GUID.
(??\volume{GUID}\ )

-----Original Message-----
From: xxxxx@hotmail.com [mailto:xxxxx@hotmail.com]
Sent: Tuesday, May 14, 2002 9:45 AM
To: File Systems Developers
Subject: [ntfsd] Opening a file through a shadow device from user mode.

Hi,

I’d appreciate any help on the following problem.

I’ve created a shadow device which works with ZwCreateFile from kernel
mode.

Now, I’m trying to use CreateFile from a user mode application to open a
file through the shadow device and get ERROR_PATH_NOT_FOUND. I’ve tried
specifing the path a number of ways but keep getting the same error.

Can someone please tell me how to specify the path?

The sample app I’m using to test is below.

Much Thanks,
Mark

int main(int argc, char* argv)
{
HANDLE h;
DWORD dwError;

h = CreateFile(“\Device\PassThrough_C\temp\test.txt”,
GENERIC_READ,
0, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_NO_BUFFERING,
NULL);
if(h != INVALID_HANDLE_VALUE)
{
CloseHandle(h);
}
else
{
dwError = GetLastError();
}
return 0;
}


You are currently subscribed to ntfsd as: xxxxx@Legato.COM
To unsubscribe send a blank email to %%email.unsub%%