|
ZwQuerySystemInformation(SystemHandleInformation,NULL,0,&nSize);为什么调用失败?第一个解决的,就
[复制链接]
ULONG nSize;
ULONG pBuffer;
NTSTATUS status;
DbgPrint("GetHandleList\n");
//pBuffer =(ULONG)ExAllocatePool(PagedPool,0x1000);
status = ZwQuerySystemInformation(SystemHandleInformation,NULL,0,&nSize);
if(NT_SUCCESS( status ))
{
pBuffer =(ULONG)ExAllocatePool(NonPagedPool,nSize);
status = ZwQuerySystemInformation(SystemHandleInformation,(PVOID)pBuffer,nSize,NULL);
if ( !NT_SUCCESS( status ) )
{
ExFreePool( pBuffer );
return STATUS_UNSUCCESSFUL;
}
else
return pBuffer;
}
else
return 0;
|
|