Group: Authentication - Library: winscard
Note that this document contains some links to the old news2news website which does not work at the moment. This material will be available sometime in the future.
Establishes a connection (using a specific resource manager context) between the calling application and a smart card contained by a specific reader.
LONG SCardConnect(
__in SCARDCONTEXT hContext,
__in LPCTSTR szReader,
__in DWORD dwShareMode,
__in DWORD dwPreferredProtocols,
__out LPSCARDHANDLE phCard,
__out LPDWORD pdwActiveProtocol
);
DECLARE LONG SCardConnect IN Winscard;
INTEGER hContext,;
STRING szReader,;
LONG dwShareMode,;
LONG dwPreferredProtocols,;
INTEGER @phCard,;
LONG @pdwActiveProtocol
hContext [in] A handle that identifies the resource manager context.
szReader [in] The name of the reader that contains the target card.
dwShareMode [in] A flag that indicates whether other applications may form connections to the card.
dwPreferredProtocols [in] A bitmask of acceptable protocols for the connection.
phCard [out] A handle that identifies the connection to the smart card in the designated reader.
pdwActiveProtocol [out] A flag that indicates the established active protocol.
Returns SCARD_S_SUCCESS (0) or error code.
Purchase complete VFP solution.
See also: SCardReconnect, SCardDisconnect.