SCardWriteCacheA function (winscard.h)
The SCardWriteCache function writes a name-value pair from a smart card to the global cache maintained by the Smart Card Resource Manager.
Syntax
LONG SCardWriteCacheA(
[in] SCARDCONTEXT hContext,
[in] UUID *CardIdentifier,
[in] DWORD FreshnessCounter,
[in] LPSTR LookupName,
[in] PBYTE Data,
[in] DWORD DataLen
);
Parameters
[in] hContext
A handle that identifies the resource manager context. The resource manager context is set by a previous call to SCardEstablishContext.
[in] CardIdentifier
A pointer to a value that uniquely identifies the smart card from which the name-value pair was read.
[in] FreshnessCounter
The current revision of the cached data.
[in] LookupName
A pointer to a null-terminated string that contains the name portion of the name-value pair to write to the global cache.
[in] Data
A pointer to an array of byte values that contain the value portion of the name-value pair to write to the global cache.
[in] DataLen
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 size of the specified name-value pair exceeds the maximum size defined for the global cache. |
Remarks
Note
The winscard.h header defines SCardWriteCache as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Target Platform | Windows |
Header | winscard.h |
Library | Winscard.lib |
DLL | Winscard.dll |