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

LONG IFDGetCapabilities ( PREADER_CONTEXT  rContext,
DWORD  dwTag,
PDWORD  pdwLength,
PUCHAR  pucValue 
)

Get's capabilities in the reader. Other functions int this file will call the driver directly to not cause a deadlock.

Definition at line 275 of file ifdwrapper.c.

Referenced by SCardGetAttrib().

{
      RESPONSECODE rv = IFD_SUCCESS;

#ifndef PCSCLITE_STATIC_DRIVER
      RESPONSECODE(*IFD_get_capabilities) (DWORD, /*@out@*/ PUCHAR) = NULL;
      RESPONSECODE(*IFDH_get_capabilities) (DWORD, DWORD, PDWORD, /*@out@*/ PUCHAR) = NULL;

      if (rContext->dwVersion == IFD_HVERSION_1_0)
            IFD_get_capabilities =
                  rContext->psFunctions.psFunctions_v1.pvfGetCapabilities;
      else
            IFDH_get_capabilities =
                  rContext->psFunctions.psFunctions_v2.pvfGetCapabilities;
#endif

      /* LOCK THIS CODE REGION */
      (void)SYS_MutexLock(rContext->mMutex);

#ifndef PCSCLITE_STATIC_DRIVER
      if (rContext->dwVersion == IFD_HVERSION_1_0)
            rv = (*IFD_get_capabilities) (dwTag, pucValue);
      else
            rv = (*IFDH_get_capabilities) (rContext->dwSlot, dwTag,
                  pdwLength, pucValue);
#else
      if (rContext->dwVersion == IFD_HVERSION_1_0)
            rv = IFD_Get_Capabilities(dwTag, pucValue);
      else
            rv = IFDHGetCapabilities(rContext->dwSlot, dwTag, pdwLength,
                  pucValue);
#endif

      /* END OF LOCKED REGION */
      (void)SYS_MutexUnLock(rContext->mMutex);

      return rv;
}


Generated by  Doxygen 1.6.0   Back to index