extern "C" PB_RESULT __declspec(dllexport)CRDR_ReadData(OUT char* lpBuffer, IN DWORD dwBufferSize,
OUT DWORD lpNumberOfBytesRead)
{
WriteLog4("[CRDR_ReadData]dwBufferSize=%d",dwBufferSize);
if (m_crdr.m_ptrarrayCardInfo.GetSize()>0)
{
CARD_INFO *pCardInfo = NULL;
pCardInfo = (CARD_INFO)m_crdr.m_ptrarrayCardInfo.GetAt(0);
int nLenth = strlen(pCardInfo->cardno)+1;
//DWORD dLen = nLenth + 1;
memcpy(lpBuffer,pCardInfo->cardno,nLenth);
*lpNumberOfBytesRead = nLenth-1;
if (pCardInfo != NULL)
delete pCardInfo;
m_crdr.m_ptrarrayCardInfo.RemoveAt(0);
WriteLog4("[CRDR_ReadData]lpBuffer=%s,nLenth=%d",lpBuffer,*lpNumberOfBytesRead);
}
return PB_OK;
}