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

    Unhappy problem with IOCTL_DISK_SET_DRIVE_LAYOUT

    Hi All,

    I am trying to decrease the size of my C: drive(OS drive)by using IOCTL_DISK_SET_DRIVE_LAYOUT control code,where I assign the new size of the volume, the computer reboots immediately, whereas its working fine with other volumes.

    I am looking for the cause that why it happens only when i trim the size of OS drive? Why the computer restarts. And how can I trim the OS drive without this restart?



    Thanks,
    Mayank

  2. #2
    Join Date
    Nov 2003
    Location
    Belgium
    Posts
    8,150

    Re: problem with IOCTL_DISK_SET_DRIVE_LAYOUT

    It sounds reasonable to me that you cannot trim the OS drive while it is running.
    When you run the IOCTL_DISK_SET_DRIVE_LAYOUT commend on your OS drive, does it do the trimming during the reboot?
    Marc Gregoire - NuonSoft (http://www.nuonsoft.com)
    My Blog
    Wallpaper Cycler 3.5.0.97

    Author of Professional C++, 4th Edition by Wiley/Wrox (includes C++17 features)
    ISBN: 978-1-119-42130-6
    [ http://www.facebook.com/professionalcpp ]

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

    Re: problem with IOCTL_DISK_SET_DRIVE_LAYOUT

    Yes It does during reboot. But I dont want to get the PC reboot.

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