SCardReadCache function
The SCardReadCache function retrieves the value portion of a name-value pair from the global cache maintained by the Smart Card Resource Manager.
Syntax
LONG WINAPI SCardReadCache( _In_ SCARDCONTEXT hContext, _In_ UUID *CardIdentifier, _In_ DWORD FreshnessCounter, _In_ LPTSTR LookupName, _Out_ PBYTE Data, _Out_ DWORD *DataLen );
Parameters
- hContext [in]
-
A handle that identifies the resource manager context. The resource manager context is set by a previous call to SCardEstablishContext.
- CardIdentifier [in]
-
A pointer to a value that uniquely identifies a smart card. The name-value pair that this function reads from the global cache is associated with this smart card.
- FreshnessCounter [in]
-
The current revision of the cached data.
- LookupName [in]
-
A pointer to a null-terminated string that contains the name portion of the name-value pair for which to retrieve the value portion.
- Data [out]
-
A pointer to an array of byte values that contain the value portion of the name-value pair specified by the LookupName parameter.
- DataLen [out]
-
A pointer to the size, in bytes, of the Data buffer.
Return value
If the function succeeds, it returns SCARD_S_SUCCESS.
If the function fails, it returns one of the following error codes. For more information, see Smart Card Return Values.
| Return code/value | Description |
|---|---|
|
The specified name-value pair was not found in the global cache. |
|
The specified name-value pair was older than requested and has been deleted from the cache. |
Requirements
|
Minimum supported client |
Windows Vista [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2008 [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
|
Unicode and ANSI names |
SCardReadCacheW (Unicode) and SCardReadCacheA (ANSI) |
See also