Symbolic links

Hi ppl,

I have created a symbolic link and successfully registered the device. The
symlinks.exe utility shows that link too. But the createfile() is not able
to open that driver through the symbolic link. It returns
INVALID_DEVICE_HANDLE.

Any help would be worth a try…

Thank you
Arijit

Hi Arijit,
Check your Createfile Parameters and try again.Just ensure that the driver
access is shared.
syntax:-
hDevice = CreateFile( FILESPY_W32_DEVICE_NAME, /*Symbolic Link*/
GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_DELETE, NULL, OPEN_EXISTING,
0, NULL);

Regards,
Gaurav

>>>>>
Hi ppl,

I have created a symbolic link and successfully registered the device. The
symlinks.exe utility shows that link too. But the createfile() is not able
to open that driver through the symbolic link. It returns
INVALID_DEVICE_HANDLE.

Any help would be worth a try…

Thank you
Arijit

What about telling us what you do? What’s the string you pass to
CreateFile()? What does GetLastError() return?

Mat

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Arijit Bhattacharyya
Sent: Tuesday, September 07, 2004 4:13 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Symbolic links

Hi ppl,

I have created a symbolic link and successfully registered the device. The
symlinks.exe utility shows that link too. But the createfile() is not able
to open that driver through the symbolic link. It returns
INVALID_DEVICE_HANDLE.

Any help would be worth a try…

Thank you
Arijit


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

Did you clear the DO_DEVICE_INITIALIZING bit from DeviceObject->Flags?
(You need to this for every device object created outside of the calling
context of DriverEntry).

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Arijit
Bhattacharyya
Sent: Tuesday, September 07, 2004 1:13 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Symbolic links

Hi ppl,

I have created a symbolic link and successfully registered the device.
The
symlinks.exe utility shows that link too. But the createfile() is not
able
to open that driver through the symbolic link. It returns
INVALID_DEVICE_HANDLE.

Any help would be worth a try…

Thank you
Arijit


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument:
‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

Hi Gaurav
Well, the syntax is pretty clear…no problem with that…but how do I
check whether driver access is shared or not??

Thanks
Arijit

Hi Arijit,
Check your Createfile Parameters and try again.Just ensure that the driver
access is shared.
syntax:-
hDevice = CreateFile( FILESPY_W32_DEVICE_NAME, /*Symbolic Link*/
GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_DELETE, NULL, OPEN_EXISTING,
0, NULL);

Regards,
Gaurav

>>>>>>
Hi ppl,

I have created a symbolic link and successfully registered the device. The
symlinks.exe utility shows that link too. But the createfile() is not able
to open that driver through the symbolic link. It returns
INVALID_DEVICE_HANDLE.

Any help would be worth a try…

Thank you
Arijit


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@fht-esslingen.de
To unsubscribe send a blank email to xxxxx@lists.osr.com

Hi,
Make the device access shared in IoCreateDevice routine.See help of
IoCreateDevice on how to make a device access shared.
In normal conditions this is not required but if two apps are running
simultaneously and calling CreateFile then the device should be shared o.w
INVALID_DEVICE_HANDLE error comes for the second app calling CreateFile.

Regards
Gaurav

>>>>>>>>>>>>>>>>>>>>>>
Hi Gaurav
Well, the syntax is pretty clear…no problem with that…but how do I
check whether driver access is shared or not??

Thanks
Arijit

Hi Arijit,
Check your Createfile Parameters and try again.Just ensure that the driver
access is shared.
syntax:-
hDevice = CreateFile( FILESPY_W32_DEVICE_NAME, /*Symbolic Link*/
GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_DELETE, NULL, OPEN_EXISTING,
0, NULL);

Regards,
Gaurav

>>>>>>
Hi ppl,

I have created a symbolic link and successfully registered the device. The
symlinks.exe utility shows that link too. But the createfile() is not able
to open that driver through the symbolic link. It returns
INVALID_DEVICE_HANDLE.

Any help would be worth a try…

Thank you
Arijit