Could anyone tell me what is wrong with the following piece of code:
HANDLE hDriver;
hDriver = CreateFile("\\\\.\\E:", GENERIC_READ,
FILE_SHARE_READ,0,OPEN_EXISTING,0,0);
The problem is with the string as far as i know because when i call the ReadFile function and pass it the handle hDriver i get error6 which is INVALID_HANDLE.
I've tried all sorts of variations of the string and still nothing but error6.
According to MSDN the string should be ok.
I regularly use the string "\\\\.\\physicaldrive0" and this works fine but i want to access logical partitions.
HANDLE hDriver;
hDriver = CreateFile("\\\\.\\E:", GENERIC_READ,
FILE_SHARE_READ,0,OPEN_EXISTING,0,0);
The problem is with the string as far as i know because when i call the ReadFile function and pass it the handle hDriver i get error6 which is INVALID_HANDLE.
I've tried all sorts of variations of the string and still nothing but error6.
According to MSDN the string should be ok.
I regularly use the string "\\\\.\\physicaldrive0" and this works fine but i want to access logical partitions.