CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9
  1. #1
    Join Date
    Jul 2007
    Location
    Pune, INDIA
    Posts
    128

    Unhappy Rearding Drive letters of the partitions.

    Hi all,
    I am stucked in a problem. How can I get the drive letter of my last partition. Is there any API or any other way to know which drive letter is assigned to my last partition?
    I have the partition number i.e. by applying IOCTL_DISK_GET_DRIVE_LAYOUT i will get the partition number, But how to retrieve its drive letter.

    Please help!!!!



    Thanks.

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: Rearding Drive letters of the partitions.

    But how are you getting a handle to device (to this partition)?
    Victor Nijegorodov

  3. #3
    Join Date
    Jul 2007
    Location
    Pune, INDIA
    Posts
    128

    Re: Rearding Drive letters of the partitions.

    Well I am using the HANDLE of the Entire Hard disk using IOCTL_DISK_GET_DRIVE_LAYOUT. Through which with the partition entries I can get the partition number of my last partition of my disk.

  4. #4
    Join Date
    Jan 2008
    Posts
    48

    Re: Rearding Drive letters of the partitions.

    It's a Win32 api FAQ
    See Adv. Win32 api ng (news://194.177.96.26/comp.os.ms-wind...ogrammer.win32)

  5. #5
    Join Date
    Jul 2007
    Location
    Pune, INDIA
    Posts
    128

    Re: Rearding Drive letters of the partitions.

    Sorry but this link is not working i think, its not opening. I didnt get you what you trying to say.

  6. #6
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: Rearding Drive letters of the partitions.

    Victor Nijegorodov

  7. #7
    Join Date
    Jul 2007
    Location
    Pune, INDIA
    Posts
    128

    Re: Rearding Drive letters of the partitions.

    Is there any win32 API to find the drive letter or I have to search my problem in those 93000 solutions from that link?

  8. #8
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: Rearding Drive letters of the partitions.

    Quote Originally Posted by mayank_3103
    Is there any win32 API to find the drive letter or I have to search my problem in those 93000 solutions from that link?
    Didn't you try to search for you_ particular_problem (something like for IOCTL_DISK_GET_DRIVE_LAYOUT or just for Drive letter) among "those 93000 solutions"?
    Victor Nijegorodov

  9. #9
    Join Date
    Jul 2007
    Location
    Pune, INDIA
    Posts
    128

    Re: Rearding Drive letters of the partitions.

    thanks VictorN for that link.

    I have got something in that,I will try then let you know.

    Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured