Fransn - are these 4 functions a secret? Why can't you just tell him what they are? :confused:Quote:
Originally Posted by fransn
Printable View
Fransn - are these 4 functions a secret? Why can't you just tell him what they are? :confused:Quote:
Originally Posted by fransn
Well I very well know those 4 functions. But those doesnt solve my problem. coz those 4 functions are in regarding to the drive letters only. And I am looking for somthing that can move my partitions fast as well as efectively.
And the problem is with the drive letters is that I am mentioning here:
Suppose I am having 4 drives in my system naming "C,D,E,F,G"
Now suppose I am moving (E:) drive to other location and after updating the partition table, windows generate a new drive letter and assign that in place of (E:) say suppose (L:).
Now programmatically How will I identify Which new drive letter is assigned to my recently moved partition? so that I can change back that to the previous Letter. I have the previous drive letter with me, but not the new one!!!
This deleting and assigning the old drive letter can be done with "SetVolumeMountPoint","DeleteVolumeMountPoint". But for this I need to identify the new Drive letter.
Hope you all must have understood my problem!!!!
Thanks
You could use QueryDosDevice and GetVolumeNameForVolumeMountPoint to iterate through your partitions until you find the new one and change that back to the old letter.
could you please elaborate your suggestion.
See what happens that whenever I moves a partition, a new GUID as well as a new drive letter is generated at : "HKLM\SYSTEM\MountedDevices" . Now how can I find a new GUID with "QueryDosDevice" and "GetVolumeNameForVolumeMountPoint"?
Should I keep all the guids with me before moving the partition so that to compare after moving the partition?
Well I know to get the list of current drive letters by using a function"GetLogicalDrives()"
But it returns the value in the Dword.
In my case the value its returning is 34780
This also I know that to identify the drive letters first convert this digit to binary, then starting from the least significant bit towards its left i start reading the values. least significant bit is drive letter A,next to it is B: and so on. 0 represents non existing and 1 represents existing.
Can anyone can show me how to convery this DWORD value to the assigned drive letters PROGRAMMATICALLY. I am not able to write code for this.
Thanks
what my problem is suppose I have 2 hard disk connected in my PC
They both having 4 partitions each.
by using the function "GetLogicalDrives" I can get the drive letters of all the partitions. Say suppose C:,D:,E:,F:,G:,H:,I:,J:.
Now the problem is how I am going to identify which drive letters belongs to which Hard drive?
If I just want to have the drive letters of the "PhysicalDrive0" how I am going to differentiate. Is there any function through which I can get the Disk number from drive letters???