ZwSetSystemInformation为什么加载不上驱动
ZwSetSystemInformation为什么加载不上驱动, 我的系统是xp sp2,编绎的是标准例子,没有错,就是驱动加载不上
#define SystemLoadAndCallImage 38
typedef long NTSTATUS;
bool load_sysfile()
{
SYSTEM_LOAD_AND_CALL_IMAGE GregsImage;
WCHAR daPath[] = L"\\??\\C:\\Helloddk.SYS";
//////////////////////////////////////////////////////////////
// get DLL entry points
//////////////////////////////////////////////////////////////
if( !(RtlInitUnicodeString = (RTLINITUNICODESTRING)
GetProcAddress( GetModuleHandle("ntdll.dll")
,"RtlInitUnicodeString"
)))
{
printf("RtlInitUnicodeString\n");
return false;
}
if(!(ZwSetSystemInformation = (ZWSETSYSTEMINFORMATION)
GetProcAddress(
GetModuleHandle("ntdll.dll")
,"ZwSetSystemInformation" )))
{
printf("Get--ZwSetSystemInformation\n");
return false;
}
RtlInitUnicodeString(
&(GregsImage.ModuleName)
,daPath
);
if(
!NT_SUCCESS(
ZwSetSystemInformation(
SystemLoadAndCallImage
,&GregsImage
,sizeof(SYSTEM_LOAD_AND_CALL_IMAGE))))
{
printf("ZwSetSystemInformation\n");//到这失败了
return false;
}
return true;
}