DeviceIOControl And Disk_Get_Drive_Layout?

Jan 17, 2010

I 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')

View 1 Replies


ADVERTISEMENT

Get The HDD Disk Drive Information From The DeviceIOControl?

Mar 3, 2010

I am trying to get the HDD Disk Drive information from the DeviceIOControl function with IOCTL_DISK_GET_DRIVE_LAYOUT_EX control code.

Here are the problems :1. The DeviceIOControl function returns(as from output buffer) DRIVE_LAYOUT_INFORMATION_EX structure. Which contains some data types i am unable to get.

[Code]...

View 4 Replies

Using DeviceIoControl Win32 API To Power Down USB Port?

Nov 25, 2010

How do I use DeviceIoControl Win32 API and the IOCTL in VB oder C#/C+/C++ to power down a USB port?

View 1 Replies

DeviceIOControl Function - Read The Table Of Contents From A CD

Aug 25, 2011

I'm trying to read the table of contents from a CD and am having problems with the DeviceIOControl function. When I call it with a control code of IOCTL_CDROM_EJECT_MEDIA or IOCTL_CDROM_LOAD_MEDIA it works fine, and opens or closes the CD drawer. But when I call it with a code of IOCTL_CDROM_READ_TOC_EX it gives an error code of 6 (ERROR_INVALID_HANDLE). I'm using the same handle, so I can't see why it's complaining. It's possible that the input data that I'm giving it is wrong, but I don't think that it should give this particular error in that case.
[Code]

View 14 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved