DeviceIoControl function kernel32

int DeviceIoControl(
  1. int hDevice,
  2. int dwIoControlCode,
  3. Pointer<NativeType> lpInBuffer,
  4. int nInBufferSize,
  5. Pointer<NativeType> lpOutBuffer,
  6. int nOutBufferSize,
  7. Pointer<Uint32> lpBytesReturned,
  8. Pointer<OVERLAPPED> lpOverlapped
)

Sends a control code directly to a specified device driver, causing the corresponding device to perform the corresponding operation.

BOOL DeviceIoControl(
  HANDLE       hDevice,
  DWORD        dwIoControlCode,
  LPVOID       lpInBuffer,
  DWORD        nInBufferSize,
  LPVOID       lpOutBuffer,
  DWORD        nOutBufferSize,
  LPDWORD      lpBytesReturned,
  LPOVERLAPPED lpOverlapped
);

Implementation

int DeviceIoControl(
        int hDevice,
        int dwIoControlCode,
        Pointer lpInBuffer,
        int nInBufferSize,
        Pointer lpOutBuffer,
        int nOutBufferSize,
        Pointer<Uint32> lpBytesReturned,
        Pointer<OVERLAPPED> lpOverlapped) =>
    _DeviceIoControl(hDevice, dwIoControlCode, lpInBuffer, nInBufferSize,
        lpOutBuffer, nOutBufferSize, lpBytesReturned, lpOverlapped);