Win32 IOCTL Calls

Use DeviceIoControl to call a driver from the Win32 environment.

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

Parameters

dwIoControlCode
Contains one of the control codes referred to in this document.
lpInBuffer
Contains either a minor I/O control code or data to be sent to a smart card.
nInBufferSize
The number of bytes to be sent to the card.
lpOutBuffer
Receives the result from the smart card.
nOutBufferSize
The size of the buffer.
lpBytesReturned
The number of bytes returned by this particular call.

Refer to the Platform SDK for more information and descriptions of the remaining parameters.