vc代码dll里如何调用NtCreateFile函数? - C++ Builder / Windows SDK/API
vc代码dll里如何调用NtCreateFile函数?
有具体代码吗?
[解决办法]
NTSTATUS ntStatus;
OBJECT_ATTRIBUTES pAttr1;
UNICODE_STRING FileName;
IO_STATUS_BLOCK IoStatus;
RtlInitUnicodeString(&FileName,L"\\??\\C:\\Test.txt");
InitializeObjectAttributes(&pAttr1, &FileName,OBJ_CASE_INSENSITIVE, NULL, NULL);
ntStatus=ZwCreateFile(&hFile,GENERIC_READ,&pAttr1,&IoStatus,NULL,0,0,1,96,NULL,0);