|
本帖最后由 sunsea 于 2014-10-19 07:01 编辑
我已经快被这个Bug折腾疯了
UNICODE_STRING DeviceName;
RtlInitUnicodeString(&DeviceName,L"\\Device\\Harddisk0\\Partition0");
OBJECT_ATTRIBUTES ObjAttb;
HANDLE handle;
IO_STATUS_BLOCK io_status;
InitializeObjectAttributes(&ObjAttb,&DeviceName,OBJ_CASE_INSENSITIVE|OBJ_KERNEL_HANDLE,NULL,NULL);
NTSTATUS status=ZwOpenFile(&handle,GENERIC_READ|GENERIC_WRITE,&ObjAttb,&io_status,FILE_SHARE_READ|FILE_SHARE_WRITE,FILE_NON_DIRECTORY_FILE|FILE_SYNCHRONOUS_IO_NONALERT);
为啥status总是收到STATUS_OBJECT_PATH_SYNTAX_BAD
Information是8
换成RtlInitUnicodeString(&DeviceName,L"\\??\\PhysicalDrive0");也没用
|
|