SCardFreeMemory function
Applies to: desktop apps only
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 2000 Professional |
|---|---|
|
Minimum supported server | Windows 2000 Server |
|
Header |
|
|
Library |
|
|
DLL |
|
See also
- SCardEstablishContext
- SCardGetProviderId
- SCardListCards
- SCardListInterfaces
- SCardListReaderGroups
- SCardListReaders
Send comments about this topic to Microsoft
Build date: 3/13/2012