SCardConnect function winscard

int SCardConnect(
  1. int hContext,
  2. PCWSTR szReader,
  3. int dwShareMode,
  4. int dwPreferredProtocols,
  5. Pointer<IntPtr> phCard,
  6. Pointer<Uint32> pdwActiveProtocol,
)

Establishes a connection (using a specific resource manager context) between the calling application and a smart card contained by a specific reader.

If no card exists in the specified reader, an error is returned.

To learn more, see learn.microsoft.com/windows/win32/api/winscard/nf-winscard-scardconnectw.

Implementation

@pragma('vm:prefer-inline')
int SCardConnect(
  int hContext,
  PCWSTR szReader,
  int dwShareMode,
  int dwPreferredProtocols,
  Pointer<IntPtr> phCard,
  Pointer<Uint32> pdwActiveProtocol,
) => _SCardConnect(
  hContext,
  szReader,
  dwShareMode,
  dwPreferredProtocols,
  phCard,
  pdwActiveProtocol,
);