|
-
July 19th, 2008, 05:42 AM
#1
weird scenario in my filesystem driver
hi guys:
i've been facing a weird problem up 3 days, tht is i hooked both IRP_MJ_READ and IRP_MJ_WRITE, and IoVolumeDeviceToDosName worked very well in my own IRP_MJ_WRITE dispatch routine,and the same invoking of IoVolumeDeviceToDosName in my own IRP_MJ_READ dispatch routine always showing me a BSOD! error code 0x0000000a;this's my code in IRP_MJ_READ:
NTSTATUS status=STATUS_SUCCESS;
PFILE_OBJECT pFileObject=0;
UNICODE_STRING name,volume;
PIO_STACK_LOCATION pCurStack=0;
wchar_t nameBuffer[256]={0};
RtlInitEmptyUnicodeString( &name, nameBuffer, sizeof(nameBuffer) );
pCurStack=IoGetCurrentIrpStackLocation(pIrp);
if(pCurStack)
pFileObject=pCurStack->FileObject;
if(pFileObject)
{
status=IoVolumeDeviceToDosName(pFileObject->DeviceObject,&volume);
if(NT_SUCCESS(status))
{
DbgPrint("My_MJ_Read %ws \r\n",volume.Buffer);
ExFreePool(volume.Buffer);
}
}
somehow the same code worked well in IRP_MJ_WRITE dispath routine;
what exactly maked this happened? do i missed something?thank you very much;
Have a nice day! thx again;
-
July 30th, 2008, 01:17 AM
#2
Re: weird scenario in my filesystem driver
ahua tht was a IRQL issuse it's okay once i put this code (KeGetCurrentIrql() == PASSIVE_LEVEL) into my routine ;
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|