Using Win32 functions in Visual FoxPro Image Gallery
Authentication
SCardConnect
SCardControl
SCardDisconnect
SCardEstablishContext
SCardGetAttrib
SCardGetProviderId
SCardIsValidContext
SCardListCards
SCardListInterfaces
SCardListReaderGroups
SCardListReaders
SCardReleaseContext
SCardStatus
SCardTransmit
Code examples:
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.
Download ACOS3 Class Library

See also: SCardReconnect, SCardDisconnect
Word Index links for the SCardConnect :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2008-10-23 15:36:11
Modified: 2009-12-15 16:05:04
Visited in last 7 days: 10
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.37), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.196.72.162)
6 sec.Function: 'RemoveClipboardFormatListener'
12 sec.Function: 'InsertMenuItem'
18 sec.Function: 'capGetDriverDescription'
25 sec.Function: 'CryptGenKey'
32 sec.Function: 'PostQuitMessage'
39 sec.Function: 'WSACreateEvent'
45 sec.Function: 'CreateVirtualDisk'
51 sec.Function: 'GetModuleFileName'
58 sec.Function: 'SetPriorityClass'
1.08 min.Function: 'ExtractIcon'
Google
Advertise here!