Skip to content

Latest commit

 

History

History
78 lines (53 loc) · 1.98 KB

SCardConnect.md

File metadata and controls

78 lines (53 loc) · 1.98 KB

Home

Function name : SCardConnect

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.


Declaration:

LONG SCardConnect(
  __in   SCARDCONTEXT hContext,
  __in   LPCTSTR szReader,
  __in   DWORD dwShareMode,
  __in   DWORD dwPreferredProtocols,
  __out  LPSCARDHANDLE phCard,
  __out  LPDWORD pdwActiveProtocol
);
  

FoxPro declaration:

DECLARE LONG SCardConnect IN Winscard;
	INTEGER hContext,;
	STRING szReader,;
	LONG dwShareMode,;
	LONG dwPreferredProtocols,;
	INTEGER @phCard,;
	LONG @pdwActiveProtocol  

Parameters:

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.


Return value:

Returns SCARD_S_SUCCESS (0) or error code.


Comments:

Purchase complete VFP solution.
Download ACOS3 Class Library

See also: SCardReconnect, SCardDisconnect.