I know that this subject has been discussed here, and I think that I have got it right, but it still does not work, and I am sending this e-mail in hope somebody will see what I am doing wrong.
I was using the IoCreateSymbolicLink API on Win2K which still worked on WinXP with one caveat – the newly mounted drive letter was not visible in explorer ( it still was accessible like in Win2K via command prompt for example). I have implemented a new mountmanager interface to register the newly created symbolic links, and I got it “working” that is all interface APIs succeed, however the behavior has not changed that is I still do not see the drive letter in explorer.
Here is what I did:
- I replaced the IoCreateSymbolicLink with the following:
RtlInitUnicodeString(&name, MOUNTMGR_DEVICE_NAME);
createStatus = IoGetDeviceObjectPointer(
&name, FILE_ALL_ACCESS,&createFO, &createDO);
KeInitializeEvent(&createEvent, NotificationEvent, FALSE);
createIRP = IoBuildDeviceIoControlRequest(
IOCTL_MOUNTMGR_CREATE_POINT, createDO, createPoint, createPointSize,
NULL, 0, FALSE, &createEvent, &createIoStatus);
// Send the irp to the mount manager requesting that a new mount point (persistent symbolic link) is created for the indicated volume.
createStatus = IoCallDriver(createDO, createIRP);
- I Added the support of the following requests to IRP_MJ_DEVICE_CONTROL API:
IOCTL_MOUNTDEV_QUERY_DEVICE_NAME and IOCTL_MOUNTDEV_QUERY_UNIQUE_ID.
All calls succeed however the drive letter still does not appear in explorer until user re-logins, which is obviously unacceptable. Any help will be greatly appreciated.
Thanks in advance,
IL.