hi
i use flowing code to attach to our process for dumping purpose
but it show BSOD? IRQL_NOT_LESS_OR_EQUAL
i call Dump(pid) in DriverEntry
i use flowing code to attach to our process for dumping purpose
but it show BSOD? IRQL_NOT_LESS_OR_EQUAL
i call Dump(pid) in DriverEntry
Code: Select all
PEPROCESS ep=NULL;
NTSTATUS ret;
KAPC_STATE *ka_state=NULL;
ret=PsLookupProcessByProcessId((HANDLE)pid,&ep);
if(!NT_SUCCESS(ret))
{
//ERR DISPLAY TBD
DbgPrint("error 1");
return ret;
}
ka_state=(KAPC_STATE*)ExAllocatePoolWithTag(NonPagedPool,sizeof(KAPC_STATE),'trak');
if(!ka_state)
{
DbgPrint(" ka_state is null");
return ;
}
else KeStackAttachProcess(&ep,ka_state);
DbgPrint("Calling process name is: %s\n", PsGetProcessImageFileName(PsGetCurrentProcess()));
DbgPrint("ok");
KeUnstackDetachProcess(ka_state);
ExFreePool(ka_state);
ObDereferenceObject(ep);
Fatal System Error: 0x0000000ai debug it with windbg
(0x00000000,0x00000002,0x00000001,0x804F74E9)
FAULTING_SOURCE_CODE:what can do? and clear line 93 code dont solve BSOD problem!
89: KeStackAttachProcess(&ep,ka_state);
90:
91:
92:
> 93: DbgPrint("Calling process name is: %s\n", PsGetProcessImageFileName(PsGetCurrentProcess()));
94:
95:
96: DbgPrint("ok");
97: KeUnstackDetachProcess(ka_state);
98: ExFreePool(ka_state);
Last edited by R00tKit on Wed Apr 13, 2011 11:47 am, edited 1 time in total.
@R00tkitSMM