 |
SCardConnect ..msdn Add comment W32 Constants Translate this page |
 |
 |
Establishes a connection (using a specific resource manager context) between the calling application and a smart card contained by a specific reader.
|
 |
 |
| Code examples: |
 |
|
|
 |
 |
| 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. |
 |
 |
| Usage: |
 |
LOCAL nResult, hCard, nProtocolId
STORE 0 TO hCard, nProtocolId
nResult = SCardConnect(m.hContext,;
m.cReaderName, SCARD_SHARE_DIRECT,;
SCARD_PROTOCOL_OPTIMAL,;
@hCard, @nProtocolId)
|
 |
 |
| My comment: |
 |
Purchase complete VFP solution.

See also: SCardReconnect, SCardDisconnect |
 |
 |
| Word Index links for the SCardConnect : |
 |
|
|
 |
 |
| Translate this page: |
 |
|
 |
 |
| • |
 |
| Created: | 2008-10-23 15:36:11 | | Modified: | 2009-12-15 16:05:04 | Visited in last 7 days: 33 |