![]() | |
| |||||||
| Home | Register | Blogs | FAQ | Members List | Calendar | Downloads | Arcade | Mark Forums Read |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 |
| incomer | Task: List all available drive partitions with their volumes, parameteres (most important partition size, to calculate partition sector count) This must be a windows application. PartitionSectorCount = PartitionSize / 512; I used the DeviceIoControl(...) API function width IOCTL_DISK_GET_DRIVE_LAYOUT parameter to list all available partitions on specified disk. It works but there is one problem. It returns all partitions by their numbers, there is no information about drive letter. How can I idenitfy partition drive letter? I need that because the drive letter of partition is key to open it with CreateFile(...) API function to have direct access to that portion of drive. There is another solution. is to 1. open direct access to all portions of drive 2. read MBR (master boot record) which contains main information about partitions. I don't like this solution because it's dangerous. Error in my application may destroy file systems on entire disk drive. That's why I preffer to have full access only to some portion of drive, only to one partition to prevent any damage.
__________________ Regards, Aram |
| | |
| | #3 |
| Дошкольник Join Date: Mar 2003 Location: 2A
Posts: 102
Rep Power: 6 Reputation:
10 | GetLogicalDrives() http://support.microsoft.com/default...b;en-us;193623 |
| | |
| | #4 | |
| incomer | Quote:
tvyalneri, xekavarman hamakarg.
__________________ Regards, Aram | |
| | |
| | #5 | |
| incomer | Quote:
how I can identify it's size ? I this case GetFileSize(...) will not work.
__________________ Regards, Aram | |
| | |
| | #6 | |
| Дошкольник Join Date: Mar 2003 Location: 2A
Posts: 102
Rep Power: 6 Reputation:
10 | Quote:
| |
| | |
| | #8 | |
| incomer | Quote:
In this case it doesn't work. I even can tell why. Those APIs are depenending on partitions file system. Those functions work when there is known file system on specified partition, Those APIs will fail if there is no, or there is unknown file system on specified partition. I need file system independent APIs. I found such APIs, but they present only on Windows 2003 Server and later versions of windows. I tried them all before I made this topic.
__________________ Regards, Aram | |
| | |
| | #9 | |
| incomer | Quote:
__________________ Regards, Aram | |
| | |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Weird problem in WinXP | Boyov | Software | 4 | May 4, 2005 17:11 |
| Apache/php problem | Obelix | Web Development | 5 | Jul 31, 2004 14:48 |
| IIS problem | Hovo | Web Development | 6 | Jun 21, 2004 11:17 |
| Pancake flipping problem | acid | Algorithms | 1 | Jun 2, 2004 19:16 |
| Priner -- Problem :( | Mono | Hardware | 4 | Aug 25, 2002 03:06 |