есть указанный вызов:
BOOL DeviceIoControl(
(HANDLE) hDevice, // handle to device
IOCTL_DISK_GET_DRIVE_LAYOUT, // dwIoControlCode
NULL, // lpInBuffer
0, // nInBufferSize
(LPVOID) lpOutBuffer, // output buffer
(DWORD) nOutBufferSize, // size of output buffer
(LPDWORD) lpBytesReturned, // number of bytes returned
(LPOVERLAPPED) lpOverlapped // OVERLAPPED structure
);
...
lpOutBuffer
[out] Pointer to a buffer that receives a DRIVE_LAYOUT_INFORMATION structure.
lpBytesReturned
[out] Pointer to a variable that receives the size of the data stored in the output buffer, in bytes.
If the output buffer is too small, the call fails, GetLastError returns ERROR_INSUFFICIENT_BUFFER, and lpBytesReturned is zero.
...
---
методом н.тыка было получено, что вызов возвращает 136 b [lpBytesReturned], в то время как
40 == sizeof(DRIVE_LAYOUT_INFORMATION).
как можно объяснить такой метаморфоз ?
10х.
msdn
|