DeviceIOControl And Disk_Get_Drive_Layout?
Jan 17, 2010I have several other API calls working fine, and I've built a Disk_Get_Drive_Layout call with several supporting Structures (really, a lot) If the actual code ends up being really necessary, I'd rather post it then than spam my question with all of it. The bit I know I don't fully understand is in the DRIVE_LAYOUT_INFORMATION_EX Structure (and also the PARTITION_INFORMATION_EX Structure) where a C++ union() is called for - I built a separate structure to provide that functionality, but it does the exact same thing as everything else. The union() in C++ sets up a class with multiple members, where only 1 of those members is understood to exist at a time.
Past that, there's also an uninitialized array in one of the structures and I'm not sure exactly how to handle that - my assumption would be that the API initializes and populates it, and when I try to initialize it myself with an explicit original boundary it always throws a system error at runtime (there's no exception with the uninitialized array, but it never returns any data either and both err.GetLastDLLError and the API GetLastError function always return code 122 defined as 'Error_Insufficient_Buffer')