 |
SCardEstablishContext ..msdn Add comment W32 Constants Translate this page |
 |
 |
|
Establishes the resource manager context (the scope) within which database operations are performed. |
 |
 |
| Code examples: |
 |
|
|
 |
 |
| Declaration: |
 |
 |
LONG SCardEstablishContext(
__in DWORD dwScope,
__in LPCVOID pvReserved1,
__in LPCVOID pvReserved2,
__out LPSCARDCONTEXT phContext
);
|
 |
 |
 |
| FoxPro declaration: |
 |
 |
DECLARE LONG SCardEstablishContext IN Winscard;
INTEGER dwScope,;
INTEGER pvReserved1,;
INTEGER pvReserved2,;
INTEGER @phContext
|
 |
 |
 |
| Parameters: |
 |
dwScope [in]
Scope of the resource manager context.
pvReserved1 [in]
Reserved for future use and must be NULL.
pvReserved2 [in]
Reserved for future use and must be NULL.
phContext [out]
A handle to the established resource manager context.
|
 |
 |
| Return value: |
 |
| If the function succeeds, the function returns SCARD_S_SUCCESS (0). |
 |
 |
| Usage: |
 |
#DEFINE SCARD_SCOPE_USER 0
#DEFINE SCARD_SCOPE_SYSTEM 2
#DEFINE SCARD_S_SUCCESS 0
LOCAL hContext
hContext=0
IF SCardEstablishContext(SCARD_SCOPE_USER, 0, 0,;
@hContext) <> SCARD_S_SUCCESS
RETURN
ENDIF
...
= SCardReleaseContext(m.hContext)
|
 |
 |
| My comment: |
 |
Purchase complete VFP solution.

Upon successful call the phContext handle can be supplied to other functions attempting to do work within this context.
The error code SCARD_E_NO_SERVICE (0x8010001D), "The smart card resource manager is not running", means that the SCardSvr service is not started. By default this service is stopped.

The error code SCARD_E_NO_READERS_AVAILABLE (0x8010002E) speaks for itself.
See also: SCardReleaseContext |
 |
 |
| Word Index links for the SCardEstablishContext : |
 |
|
|
 |
 |
| Translate this page: |
 |
|
 |
 |
| • |
 |
| Created: | 2008-10-08 14:52:48 | | Modified: | 2009-12-15 16:05:49 | Visited in last 7 days: 31 |