kdkirmse
asked on
Syntax to open a raw windows 2000 partition using CreateFile
What would be the correct naming scheme to open a raw windows 2000 partition using CreateFile?
hDevice = CreateFile("\\Device\\Hard
fails with the error
"The system cannot find the path specified"
My understanding is that \Device\Harddisk0\Partitio
>>My understanding is that \Device\Harddisk0\Partitio n0
It is - in the kernel's namespace, though. Have you tried "\\\\?\\Device\\Harddisk0\ \Partition 0" (yes, this is a shotin the dark from userland)? Apart from that, I'd suggest using the drive letter like '\\.\C:' aka "\\\\.\\C:"
It is - in the kernel's namespace, though. Have you tried "\\\\?\\Device\\Harddisk0\
>>Have you tried "\\\\?\\Device\\Harddisk0\ \Partition 0"
Possibly it's not accessible in user land. Using the \\?\ mode would simply not do path parsing, so probably less of a chance.
I think only volumes and mount points are accessible, but I'd be interested to hear if not.
corey
Possibly it's not accessible in user land. Using the \\?\ mode would simply not do path parsing, so probably less of a chance.
I think only volumes and mount points are accessible, but I'd be interested to hear if not.
corey
That's why I called it "a shot in the dark :o)
'NtCreateFile()' (http://msdn.microsoft.com/library/en-us/devnotes/winprog/ntcreatefile.asp) should work, though - especially with "\\Device\\Harddisk0\\Part ition0"
'NtCreateFile()' (http://msdn.microsoft.com/library/en-us/devnotes/winprog/ntcreatefile.asp) should work, though - especially with "\\Device\\Harddisk0\\Part
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
\\.\PHYSICALDRIVE# where # is the volume number.
What kind of access do you need?
corey