| Platform SDK: Smart Card |
The SCardFreeMemory function releases memory that has been returned from the resource manager using the SCARD_AUTOALLOCATE length designator.
LONG SCardFreeMemory( IN SCARDCONTEXT hContext, IN LPCVOID pvMem );
This function returns different values depending on whether it succeeds or fails.
| Outcome | Return value |
|---|---|
| Success | SCARD_S_SUCCESS. |
| Failure | An error code (see Error Codes for a list of all error codes). |
// Free the memory.
// lReturn is of type LONG.
// hSC was set by an earlier call to SCardEstablishContext.
// pmszReaders was set by an earlier call to SCardListReaders.
lReturn = SCardFreeMemory(hSC,
pmszReaders );
if ( SCARD_S_SUCCESS != lReturn )
printf("Failed SCardFreeMemory\n");
Windows NT/2000: Requires Windows NT 4.0 SP3 or later.
Windows 95/98: Requires Windows 95 OSR2.1 or later.
Header: Declared in Winscard.h. Library: Use Winscard.lib.
SCardEstablishContext, SCardGetProviderId, SCardListCards' SCardListInterfaces, SCardListReaderGroups, SCardListReaders