SCardFreeMemory function
The SCardFreeMemory function releases memory that has been returned from the resource manager using the SCARD_AUTOALLOCATE length designator.
Syntax
LONG WINAPI SCardFreeMemory( _In_ SCARDCONTEXT hContext, _In_ LPCVOID pvMem );
Parameters
- hContext [in]
-
Handle that identifies the resource manager context returned from SCardEstablishContext, or NULL if the creating function also specified NULL for its hContext parameter. For more information, see Smart Card Database Query Functions.
- pvMem [in]
-
Memory block to be released.
Return value
This function returns different values depending on whether it succeeds or fails.
| Return code | Description |
|---|---|
|
SCARD_S_SUCCESS. |
|
An error code. For more information, see Smart Card Return Values. |
Examples
The following example shows how to free memory allocated by the resource manager. The example assumes that lReturn is an existing variable of type LONG, that hSC is a valid handle to a resource manager context obtained from a previous call to the SCardEstablishContext function, and that pmszReaders is a string initialized in a previous call to the SCardListReaders function.
lReturn = SCardFreeMemory(hSC,
pmszReaders );
if ( SCARD_S_SUCCESS != lReturn )
printf("Failed SCardFreeMemory\n");
Requirements
|
Minimum supported client |
Windows XP [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2003 [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
See also
- SCardEstablishContext
- SCardGetProviderId
- SCardListCards
- SCardListInterfaces
- SCardListReaderGroups
- SCardListReaders