Hello,
I wrote a FileSystem Filter driver with two binaries…one for Win2K another
for Win2K3. Thanks for previously helping me figure out that I can’t build
a Win2K3 driver on a Win2K system.
I make the call in IRP_MJ_CREATE. In Win2K I call
RtlVolumeDeviceToDosName( ), and it works like a charm. I call the
IoVolumeDeviceToDosName( ) in the Win2K3 driver, and I get the error
‘STATUS_INVALID_DEVICE_REQUEST ((NTSTATUS)0xC0000010L)’
What am I missing?
Win2K works.
status = RtlVolumeDeviceToDosName( irpSp->DeviceObject, &DosName );
Win2K3 doesn’t work.
status = IoVolumeDeviceToDosName( irpSp->DeviceObject, &DosName );
Regards,
Here are snippets to show how the code works…
typedef
NTSTATUS
(*PSF_IO_VOLUME_DEVICE_TO_DOS_NAME) (
IN PVOID VolumeDeviceObject,
OUT PUNICODE_STRING DosName
);
typedef struct _SF_DYNAMIC_FUNCTION_POINTERS {
//
// The following routines should all be available on Windows XP (5.1)
and
// later.
//
PSF_REGISTER_FILE_SYSTEM_FILTER_CALLBACKS
RegisterFileSystemFilterCallbacks;
PSF_ATTACH_DEVICE_TO_DEVICE_STACK_SAFE AttachDeviceToDeviceStackSafe;
…
PSF_GET_VERSION GetVersion;
PSF_IO_VOLUME_DEVICE_TO_DOS_NAME IoVolumeDeviceToDosName;
} SF_DYNAMIC_FUNCTION_POINTERS, *PSF_DYNAMIC_FUNCTION_POINTERS;
SF_DYNAMIC_FUNCTION_POINTERS gSfDynamicFunctions = {0};
.
.
.
VOID
SfLoadDynamicFunctions ( )
{
…
RtlInitUnicodeString( &functionName, L"IoVolumeDeviceToDosName" );
gSfDynamicFunctions.IoVolumeDeviceToDosName =
MmGetSystemRoutineAddress( &functionName );
//This works, because I checked that
gSfDynamicFunctions.IoVolumeDeviceToDosName is not NULL.
}
.
.
.
NTSTATUS
SfCreate (
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp )
{
…
PIO_STACK_LOCATION irpSp = IoGetCurrentIrpStackLocation( Irp );
…
status =
gSfDynamicFunctions.IoVolumeDeviceToDosName(irpSp->DeviceObject,
&DosName );
// This is where I get the error status = 'STATUS_INVALID_DEVICE_REQUEST
((NTSTATUS)0xC0000010L)
…
}
Thank you,
-SteveC