I have to write a code to access hidden disk partitions/volumes using c# or c++. But could not find any help reference on the matter.
As a hidden volume, it does not contain a "Disk Letter", so you can´t just type "C:\" and access it. A example would be the "recovery partition" that comes with Windows. You can´t see it on explorer but it is there.
My application will write and read data from thoose partitions and I have to find a way of doing something like "c:\" for thoose.
In the above image, volumes 5 and 6 are hidden partitions. I have found this link on stackoverflow but it only "list" de partitions: https://msdn.microsoft.com/en-us/library/cc542456(v=VS.85).aspx
EDIT
The problem is: even using WMI as suguested I could´t find how to filter the the Volume when looking for files.
Example, select * from win32_DataFile
will list all Files in the machine.
I think should be a way of filtering the Volumes using their ID(or name). Something like:
select * from win32_DataFile
where volumeId = '\\?\Volume{2d5f3a68-75f5-44c4-aa42-716b45811916}\'
Or a more beautiful way like:
var files = Directory.GetFiles(@"\\?\Volume{6ff7748e-78db-4838-8896-254b074918f5}\");
Also, I found a excelent awenser in about Partitions and Volumes (their are not the same thing) https://social.technet.microsoft.com/Forums/en-US/e7b2ddd6-f245-49ed-8fec-3b6e08e75369/how-do-i-find-the-partition-guid?forum=winservergen
EDIT2
As awensered by Harry, using "\.\Volume...." was a good way to recovery files. But I could not find a way to write(create) a new file using c#. The best approch so far is using pinvoke to c++ CreateFile method/handle.
Any advice?