Logo Search packages:      
Sourcecode: pcsc-lite version File versions  Download package

LONG SCardFreeMemory ( SCARDCONTEXT  hContext,
LPCVOID  pvMem 
)

Releases memory that has been returned from the resource manager using the SCARD_AUTOALLOCATE length designator.

Parameters:
[in] hContext Connection context to the PC/SC Resource Manager.
[in] pvMem pointer to allocated memory
Returns:
Error code.
Return values:
SCARD_S_SUCCESS Successful (SCARD_S_SUCCESS)

Definition at line 3321 of file winscard_clnt.c.

References SCARD_E_INVALID_HANDLE, SCARD_S_SUCCESS, SCardCheckDaemonAvailability(), and SCardGetContextIndice().

{
      LONG rv = SCARD_S_SUCCESS;
      LONG dwContextIndex;

      PROFILE_START

      rv = SCardCheckDaemonAvailability();
      if (rv != SCARD_S_SUCCESS)
            return rv;

      /*
       * Make sure this context has been opened
       */
      dwContextIndex = SCardGetContextIndice(hContext);
      if (dwContextIndex == -1)
            return SCARD_E_INVALID_HANDLE;

      free((void *)pvMem);

      PROFILE_END(rv)

      return rv;
}


Generated by  Doxygen 1.6.0   Back to index