Is it possible to browse through Hidden Drives. Using VC++/C++?
-
You have all the answers. What problem are you facing here?
«_Superman_» I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++)I was not able to get the volumes with respect to a disk. If PC has two Hard disks, each has multiple volumes. First disk has one hidden volume, second disk has two or some hidden volumes. I need to get the total Disks, and In that particular disk the total volumes along with hidden. Any clue in this way. I got the solution as total volumes. but not with respect to disk and its volumes.. Thanks for your reply.
Nice talking to you. :-O
If you judge people, you have no time to love them. -- Mother Teresa -
I was not able to get the volumes with respect to a disk. If PC has two Hard disks, each has multiple volumes. First disk has one hidden volume, second disk has two or some hidden volumes. I need to get the total Disks, and In that particular disk the total volumes along with hidden. Any clue in this way. I got the solution as total volumes. but not with respect to disk and its volumes.. Thanks for your reply.
Nice talking to you. :-O
If you judge people, you have no time to love them. -- Mother TeresaNot sure if this will help you but here is something you can try. Try to open a volume using
CreateFile
by specifying the file name as\\.\C:
for the C drive anddwCreationDisposition
parameter asOPEN_EXISTING
. IfCreateFile
fails, it could mean no such volume exists or you do not have permission to do this. Then you can useDeviceIoControl
on the returned handle by specifyingIOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS
as the control code. You will get the information as aVOLUME_DISK_EXTENTS
structure in thelpOutBuffer
output parameter. Remember that a disk can contain multiple volumes and a single volume can span multiple disks. You will all this information using the above function.«_Superman_» I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++) -
Not sure if this will help you but here is something you can try. Try to open a volume using
CreateFile
by specifying the file name as\\.\C:
for the C drive anddwCreationDisposition
parameter asOPEN_EXISTING
. IfCreateFile
fails, it could mean no such volume exists or you do not have permission to do this. Then you can useDeviceIoControl
on the returned handle by specifyingIOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS
as the control code. You will get the information as aVOLUME_DISK_EXTENTS
structure in thelpOutBuffer
output parameter. Remember that a disk can contain multiple volumes and a single volume can span multiple disks. You will all this information using the above function.«_Superman_» I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++)The actual straight problem here I am facing is for "C:" drive i can give path as C:\bla\bla..... But For hidden drives i was not able to give any specific base drive path. That is main problem, Is there any way to solve it. thanks a lot for your reply.:)
Nice talking to you. :-O
If you judge people, you have no time to love them. -- Mother Teresa -
The actual straight problem here I am facing is for "C:" drive i can give path as C:\bla\bla..... But For hidden drives i was not able to give any specific base drive path. That is main problem, Is there any way to solve it. thanks a lot for your reply.:)
Nice talking to you. :-O
If you judge people, you have no time to love them. -- Mother TeresaLet's assume D: is the hidden drive. In this case is it not possible to specify the volume name as
\\.\D:
?«_Superman_» I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++) -
Let's assume D: is the hidden drive. In this case is it not possible to specify the volume name as
\\.\D:
?«_Superman_» I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++)Hidden drive will not have the drive letter. If we go to the DiskManager application, and -> rightclick on one drive -> change or remove drive letter -> Click remove drive letter button. Drive letter will be removed. Also the drive will be disappered from my computer. But When we want the drive back as normal drive then we have to go to the same place same way. and you can see your drive again in my computer. add drive letter. all the data of the drive will be available as it is. Any way i will try in my ways, if i got solution i will share with you guys. Thanks.
Nice talking to you. :-O
If you judge people, you have no time to love them. -- Mother Teresa -
Hidden drive will not have the drive letter. If we go to the DiskManager application, and -> rightclick on one drive -> change or remove drive letter -> Click remove drive letter button. Drive letter will be removed. Also the drive will be disappered from my computer. But When we want the drive back as normal drive then we have to go to the same place same way. and you can see your drive again in my computer. add drive letter. all the data of the drive will be available as it is. Any way i will try in my ways, if i got solution i will share with you guys. Thanks.
Nice talking to you. :-O
If you judge people, you have no time to love them. -- Mother TeresaSo you mean to say that when the drive is hidden
CreateFile
fails?«_Superman_» I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++) -
So you mean to say that when the drive is hidden
CreateFile
fails?«_Superman_» I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++)"CreateFile & DeviceIoControl", combination is the only way i am thinking, but there must be some specific set of arguments I need to pass to call them to make it work. I dont know about that. I am first time using that creatfile function and such driver level calls etc and also there are less number of examples in net.
Nice talking to you. :-O
If you judge people, you have no time to love them. -- Mother Teresa -
"CreateFile & DeviceIoControl", combination is the only way i am thinking, but there must be some specific set of arguments I need to pass to call them to make it work. I dont know about that. I am first time using that creatfile function and such driver level calls etc and also there are less number of examples in net.
Nice talking to you. :-O
If you judge people, you have no time to love them. -- Mother TeresaTry this assuming D: is the hidden drive.
HANDLE hVol = ::CreateFile(_T("\\.\D:"), GENERIC_READ, 0, 0, OPEN_EXISTING, 0, 0);
«_Superman_» I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++) -
Try this assuming D: is the hidden drive.
HANDLE hVol = ::CreateFile(_T("\\.\D:"), GENERIC_READ, 0, 0, OPEN_EXISTING, 0, 0);
«_Superman_» I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++)Hidden drive will not have drive letter, that is the problem. :)
Nice talking to you. :-O
If you judge people, you have no time to love them. -- Mother Teresa -
Hidden drive will not have drive letter, that is the problem. :)
Nice talking to you. :-O
If you judge people, you have no time to love them. -- Mother TeresaYou mean, you don't see it. But did you try it with
CreateFile
?«_Superman_» I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++)