Problem: Partiton öffnen
-
hi,
ich habe da ein Problem beim öffnen von meiner Partition mittels NtOpenFile
ich wäre sehr dankbar wenn mir jemand sagen könnte wo der fehler ist. (fehler: kein handle auf die partition)hier mein Code:
... OpenPartition(L"\\??\\C:\\"); ... VOID OpenPartition(PTCHAR VolName) { UNICODE_STRING Volume; Volume.Buffer = (PWCHAR)VolName; Volume.Length = sizeof(VolName); Volume.MaximumLength = sizeof(VolName) + sizeof(WCHAR); OBJECT_ATTRIBUTES ObjectAttributes; IO_STATUS_BLOCK IoStatusBlock; ObjectAttributes.Attributes= 0x40L; // OBJ_CASE_INSENSITIVE; ObjectAttributes.Length = sizeof(ObjectAttributes); ObjectAttributes.ObjectName= &Volume; ObjectAttributes.RootDirectory= NULL; ObjectAttributes.SecurityDescriptor= NULL; ObjectAttributes.SecurityQualityOfService= NULL; //Open Volume "VolName" NTOPEN NTopen = (NTOPEN)::GetProcAddress(hNTDLL, "NtOpenFile"); NTSTATUS Status = NTopen(&m_hVolume,FILE_GENERIC_READ,&ObjectAttributes,&IoStatusBlock,FILE_SHARE_READ | FILE_SHARE_WRITE,FILE_NON_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT); if(m_hVolume == NULL) std::wcout << L"Keine Partition gefunden" <<std::endl; return; }
-
was bitte soll das den sein
zweifel schrieb:
\??\\C:\\
-
die partition C
hab ich auch unteranderem auch mit
L"\\DosDevices\\C:\;
L"\\SystemRoot\" //Windowsausprobiert