Partager via


SmartcardDeviceControl (Windows Embedded CE 6.0)

1/6/2010

The SmartcardDeviceControl function is the main entry function for the smart card driver library. It performs parameter checking and completes calls that do not require I/O with the smart card reader.

Syntax

NTSTATUS SmartcardDeviceControl(
  PSMARTCARD_EXTENSION SmartcardExtension,
  PBYTE pInBuf,
  DWORD nInBufSize,
  PBYTE pOutBuf,
  DWORD nOutBufSize,
  PDWORD pBytesReturned
);

Parameters

  • SmartcardExtension
    [in] Points to the smart card structure of the driver.
  • pInBuf
    [in] Same as the driver entrypoint SCR_IOControlpInBuf parameter.
  • nInBufSize
    [in] Same as the driver entrypoint SCR_IOControlnInBufSize parameter.
  • pOutBuf
    [out] Same as the driver entrypoint SCR_IOControlpOutBuf parameter.
  • nOutBufSize
    [out] Same as the driver entrypoint SCR_IOControlnOutBufSize parameter.
  • pBytesReturned
    [out] Same as the driver entrypoint SCR_IOControlpBytesReturned parameter.

Return Value

SmartcardDeviceControl returns the NTSTATUS value of the called routine.

Remarks

The driver's XXX_IOControl (Device Manager) routine must call this function to let the library check parameters and complete calls that do not need to do I/O with the reader.

The smart card driver library checks the version of the SMARTCARD_EXTENSION structure. Before calling SmartcardDeviceControl, the driver must assign to the Version member of SMARTCARD_EXTENSION the value SMCLIB_VERSION. This is usually done in the SCR_Init routine.

Requirements

Header smclib.h
Windows Embedded CE Windows CE 3.0 and later

See Also

Reference

Smart Card Driver Functions
XXX_IOControl (Device Manager)
SMARTCARD_EXTENSION