在w2k和xp中,参考DeviceIoControl函数
The DeviceIoControl function sends a control code directly to a specified device driver, causing the corresponding device to perform the specified operation.
BOOL DeviceIoControl(
HANDLE hDevice, // handle to device of interest
DWORD dwIoControlCode, // control code of operation to perform
LPVOID lpInBuffer, // pointer to buffer to supply input data
DWORD nInBufferSize, // size, in bytes, of input buffer
LPVOID lpOutBuffer, // pointer to buffer to receive output data
DWORD nOutBufferSize, // size, in bytes, of output buffer
LPDWORD lpBytesReturned, // pointer to variable to receive byte count
LPOVERLAPPED lpOverlapped // pointer to structure for asynchronous operation
);