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

Mark:

When you create your shadow device you may create a symbolic link to it (in
DosDevices objdir)
through which you will be able to access your device from UM

Regards,

Vladimir

-----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@Starbase.com
To unsubscribe send a blank email to %%email.unsub%%