M
midnighthell
I'm trying to get informations about my HDD, and I plan to use
DeviceIoControl, but i don't understand how to use it,:
First of all Function asks me to sign dwIoControlCode (this is
DRIVE_LAYOUT_INFORMATION_EX) and it must be an integer, so how can I found
it as integer.
If anyone have a sample code for this purpose, please sent it to me by
email.
[DllImport("Kernel32.dll", SetLastError = true)]
static extern bool DeviceIoControl(
IntPtr hDevice,
int dwIoControlCode,
IntPtr lpInBuffer,
int nInBufferSize,
IntPtr lpOutBuffer,
int nOutBufferSize,
out int lpBytesReturned,
IntPtr lpOverlapped
);
Thanks a lot
DeviceIoControl, but i don't understand how to use it,:
First of all Function asks me to sign dwIoControlCode (this is
DRIVE_LAYOUT_INFORMATION_EX) and it must be an integer, so how can I found
it as integer.
If anyone have a sample code for this purpose, please sent it to me by
email.
[DllImport("Kernel32.dll", SetLastError = true)]
static extern bool DeviceIoControl(
IntPtr hDevice,
int dwIoControlCode,
IntPtr lpInBuffer,
int nInBufferSize,
IntPtr lpOutBuffer,
int nOutBufferSize,
out int lpBytesReturned,
IntPtr lpOverlapped
);
Thanks a lot