BUG!
Big bug on the function FsRtlRegisterUncProviderEx!
Always returns the error: STATUS_OBJECT_MISMATCH!
How do I report a bug to MS?
devicetype=FILE_DEVICE_NETWORK_FILE_SYSTEM;
charact=FILE_DEVICE_IS_MOUNTED;
if (devicetype==FILE_DEVICE_NETWORK_FILE_SYSTEM)
charact|=FILE_REMOTE_DEVICE;
RtlInitUnicodeString( &dn, _namedriver );
status= IoCreateDevice(DriverObject, // DriverObject
0, // DeviceExtensionSize
NULL, // DeviceName
FILE_DEVICE_VIRTUAL_DISK, // DeviceType
charact, // DeviceCharacteristics
FALSE, // Not Exclusive
&diskDeviceObject // DeviceObject
);
status=IoCreateDevice(DriverObject,
sizeof (TPARAMVDF),
&dn,
devicetype,
charact,
FALSE,
&gvd);
Dcb->disk=gvd;
Dcb->dv=diskDeviceObject;
wcscpy(Dcb->_namedriver,_namedriver);
NTSTATUS status;
UNICODE_STRING cs;
RtlInitUnicodeString(&cs,Dcb->_namedriver);
KdPrintfd2((“Register NetWork driver (%ws) DeviceObject %x\n”,cs.Buffer,Dcb->dv));
status = FsRtlRegisterUncProviderEx(&(Dcb->MupHandle), &cs,Dcb->dv, 0);
if (NT_SUCCESS(status)) {
KdPrintfd2((" FsRtlRegisterUncProvider success\n"));
} else {
KdPrintfd2((" FsRtlRegisterUncProvider failed: 0x%x\n", status));
Dcb->MupHandle = 0;
}
thank you !
Help please !
I enter a name driver which not exist in cs variable.
It’s work with Dcb->disk
On 10/7/2010 12:03 PM, xxxxx@sivaller.no-ip.org wrote:
BUG!
Big bug on the function FsRtlRegisterUncProviderEx!
Always returns the error: STATUS_OBJECT_MISMATCH!
I don’t think there is a bug in this routine. One thing, you are calling
the IoCreateDevice() for the failed case with a DeviceType of
FILE_DEVICE_VIRTUAL_DISK, this won’t work. For the case where it does
work, the Dcb->Disk, the DeviceType is set to
FILE_DEVICE_NETWORK_FILE_SYSTEM which is correct.
Why do you think it is a bug?
Pete
How do I report a bug to MS?
devicetype=FILE_DEVICE_NETWORK_FILE_SYSTEM;
charact=FILE_DEVICE_IS_MOUNTED;
if (devicetype==FILE_DEVICE_NETWORK_FILE_SYSTEM)
charact|=FILE_REMOTE_DEVICE;
RtlInitUnicodeString(&dn, _namedriver );
status= IoCreateDevice(DriverObject, // DriverObject
0, // DeviceExtensionSize
NULL, // DeviceName
FILE_DEVICE_VIRTUAL_DISK, // DeviceType
charact, // DeviceCharacteristics
FALSE, // Not Exclusive
&diskDeviceObject // DeviceObject
);
status=IoCreateDevice(DriverObject,
sizeof (TPARAMVDF),
&dn,
devicetype,
charact,
FALSE,
&gvd);
Dcb->disk=gvd;
Dcb->dv=diskDeviceObject;
wcscpy(Dcb->_namedriver,_namedriver);
NTSTATUS status;
UNICODE_STRING cs;
RtlInitUnicodeString(&cs,Dcb->_namedriver);
KdPrintfd2((“Register NetWork driver (%ws) DeviceObject %x\n”,cs.Buffer,Dcb->dv));
status = FsRtlRegisterUncProviderEx(&(Dcb->MupHandle),&cs,Dcb->dv, 0);
if (NT_SUCCESS(status)) {
KdPrintfd2((" FsRtlRegisterUncProvider success\n"));
} else {
KdPrintfd2((" FsRtlRegisterUncProvider failed: 0x%x\n", status));
Dcb->MupHandle = 0;
}
thank you !
Help please !
NTFSD is sponsored by OSR
For our schedule of debugging and file system seminars
(including our new fs mini-filter seminar) visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
–
Kernel Drivers
Windows File System and Device Driver Consulting
www.KernelDrivers.com
866.263.9295