阅读:2142回复:0
请教高手!为何调用NtCreatePagingFile总报STATUS_OBJECT_NAME_INVALID错误
请教高手!我写了一个exe程序,已经确认获取了SE_CREATE_PAGEFILE_NAME权限,但是调用NtCreatePagingFile总是返回STATUS_OBJECT_NAME_INVALID错误,代码如下:
WCHAR text1[120]; UNICODE_STRING pagefile; ULARGE_INTEGER minsize; ULARGE_INTEGER maxsize; swprintf( text1, L"e:\\pagefile.sys" ); memset( &pagefile, '', sizeof(UNICODE_STRING)); pagefile.Length = wcslen(text1)*2; pagefile.MaximumLength = 120*2; pagefile.Buffer = text1; memset(&minsize, '', sizeof(ULARGE_INTEGER)); minsize.LowPart = 1024*1024*30; memset(&maxsize, '', sizeof(ULARGE_INTEGER)); maxsize.LowPart = 1024*1024*300; NtCreatePagingFile(&pagefile, &minsize, &maxsize, 0); [编辑 - 11/13/04 by felics] [编辑 - 11/13/04 by felics] |
|