Click here to Skip to main content
12,819,095 members (28,152 online)
Rate this:
Please Sign up or sign in to vote.
See more: C++ Errors
I have implemented a scardtransmit function to send a APDU command but its giving error 14. i dnt don't knw know wat what dat that means ...code is:-
all the previous functions like scardestablish context n scardconnect are working fine.
i dnt don't knw know the error.... pls please help..
DWORD dwActiveProtocol, dwSendLength, dwRecvLength;
	BYTE pbRecvBuffer[256];
	BYTE pbSendBuffer[] = { (BYTE)0x60,(BYTE) 0x00,(BYTE) 0x02, (BYTE)0x6C, (BYTE)0x35, (BYTE)0x3B, (BYTE)0x03 };
	dwSendLength = sizeof(pbSendBuffer);
	dwRecvLength = sizeof(pbRecvBuffer);
	long result =com(phCard, 0, pbSendBuffer, dwSendLength,&pioRecvPci, pbRecvBuffer, &dwRecvLength);
	cout<<"unable  to transmit the command\n";

if i remove the (BYTE) from pbSendBuffer then the error is 22...
Posted 23-May-12 1:03am
Updated 23-May-12 1:08am
Richard MacCutchan 23-May-12 10:11am
Whaere does the error code come from and what does the com() function do?
Hellexx 23-May-12 10:32am
oh sory.. com() function is acting as SCardTransmit function exported by winscard.dll..

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

SCard specific error codes are here:[^]

Generic system error codes are here:[^]


I suspect that your problem has to do with the pioRecvPci structure. The second element of that structure is a length field which you aren't initializing. It should be initialized to a valid length.

Relevant documentation:[^]


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170308.1 | Last Updated 23 May 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100