IOCTL_MOUNTDEV_QUERY_DEVICE_NAME bombarding and And Error In explorer F:/ not accessible. Access is Denied.

79 views
Skip to first unread message

Yogender Solanki

unread,
Feb 2, 2015, 12:57:41 AM2/2/15
to
I am working on a virtual drive with its own file system driver. I Have mounted
the volume. it is accessible from CMD and but in explorer it is giving error F:\
not accessible. Access Denied!! I don't know why. (There is only one volume and
one disk device that my driver is currently handling.)

Other then that i am facing bombarding of the device control request of
IOCTL_MOUNTDEV_QUERY_DEVICE_NAME and I am completing this request with following
code.
case IOCTL_MOUNTDEV_QUERY_DEVICE_NAME:
{
PMOUNTDEV_NAME PtrMountedDeviceName;
UNICODE_STRING DeviceName;
PtrMountedDeviceName = Irp->AssociatedIrp.SystemBuffer;
RtlInitUnicodeString(&ProcessedIOCTLStr,
L"IOCTL_MOUNTDEV_QUERY_DEVICE_NAME");
if (OutBufferLen < sizeof(MOUNTDEV_NAME))
{
Status = STATUS_INVALID_PARAMETER;
break;
}
RtlInitUnicodeString(&DeviceName, L"\\Device\\AFSDisk");

PtrMountedDeviceName->NameLength = DeviceName.Length;
if (OutBufferLen<sizeof(USHORT)+PtrMountedDeviceName->NameLength)
{
Information = sizeof(MOUNTDEV_NAME);
//RtlCopyMemory(PtrMountedDeviceName->Name,
DeviceName.Buffer,OutBufferLen);
Status = STATUS_BUFFER_OVERFLOW;
break;
}
RtlCopyMemory(PtrMountedDeviceName->Name, DeviceName.Buffer,
PtrMountedDeviceName->NameLength);
Status = STATUS_SUCCESS;
Information = sizeof(USHORT)+PtrMountedDeviceName->NameLength;
break;
}


Can any one suggest why windows explorer behaving like this.I used the code that
is provided in NT insider to complete IOCTL_MOUNTDEV_QUERY_DEVICE_NAME.

thanks in Advance.
Reply all
Reply to author
Forward
0 new messages