Ho modificato il mio codice in questo modo

codice:
//-----------------------------------------------------------------------------
DataLng CCTestaMovDoc::RecuperaInformazioniCard()
{
	//Mi restituisce l'handle alla sessione aperta
	SCARDCONTEXT hContext;
	long nRes;
	nRes = SCardEstablishContext(SCARD_SCOPE_USER, NULL, NULL, &hContext);
	if(nRes != SCARD_S_SUCCESS)
		return nRes; 

	//Apro la connessione con la SmartCard
	SCARDHANDLE hCard;
	LPCTSTR		lpszReaderName		= LPCTSTR(RichiediListaLettori(hContext));
	DWORD		dwSharedMode		= SCARD_SHARE_SHARED;
        DWORD		dwActiveProtocol	= SCARD_PROTOCOL_T0 | SCARD_PROTOCOL_T1;
	DWORD		dwPreferredProtocol;

	nRes = SCardConnect(
							hContext,
							lpszReaderName,
							dwSharedMode,
							dwActiveProtocol,
							&hCard,
							&dwPreferredProtocol
						);
	
	if(nRes != SCARD_S_SUCCESS)
		return nRes;

	APDU   apdu;
	BYTE*  pbtResponse;
	DWORD* pdwRespLen;

	apdu.cla = 0x00;
	apdu.ins = 0xCA;
	apdu.p1  = 0x00;
	apdu.p2  = 0x81;
	apdu.lc  = 0x00;
	apdu.le  = 0x00;
	apdu.data[0] = 0x34;
	apdu.data[1] = 0x30;

	SendAPDU(hCard,apdu,pbtResponse,pdwRespLen);

	//Chiudo la connessione con la SmartCard
	DWORD dwDisposition = SCARD_LEAVE_CARD;
	nRes = SCardDisconnect(hCard, dwDisposition);
	if(nRes != SCARD_S_SUCCESS)
		return nRes;

	//Chiudo la sessione
	nRes = SCardReleaseContext(hContext);
	if(nRes != SCARD_S_SUCCESS)
		return nRes;
}
//-----------------------------------------------------------------------------
DataLng CCTestaMovDoc::SendAPDU(SCARDHANDLE hCard, APDU apdu, BYTE* pbtResponse, DWORD* pdwRespLen)
{
	//Lunghezza dei dati da inviare
	DWORD dwSendLength;
	//Buffer contenente l'APDU
	BYTE pbtAPDU[262]; //5 + 256 + 1
	//Lunghezza del response
	DWORD dwRecvLength;
	//Buffer contenente il response
	BYTE btRecvBuffer[258]; //sw1 + sw2 + Response
	//Codice di ritorno del Resource Manager
	long nRes;
	//Codice di ritorno della smart card
	BYTE SW1;
	BYTE SW2;
	UINT nSCCode;
	//imposta la lunghezza dei dati da inviare
	dwSendLength = 6 + apdu.lc;
	//copia l'apdu nel buffer
	pbtAPDU[0] = apdu.cla;
	pbtAPDU[1] = apdu.ins;
	pbtAPDU[2] = apdu.p1;
	pbtAPDU[3] = apdu.p2;
	pbtAPDU[4] = apdu.lc;
	
	//Copia del campo data
	if(apdu.lc !=0)
	{
		memcpy(pbtAPDU + 5, apdu.data, apdu.lc);
	}

	pbtAPDU[5 + apdu.lc] = apdu.le;
	HANDLE aHandle = SCardAccessStartedEvent();
	//Invia l'APDU
	nRes = SCardTransmit(hCard,
						 SCARD_PCI_T1,
						 pbtAPDU,
						 dwSendLength,
						 NULL,
						 btRecvBuffer,
						 &dwRecvLength);
	DWORD Res = nRes;
	if(nRes != SCARD_S_SUCCESS)
		return nRes;
	//Estrae il codice di ritorno SW1 e SW2 della smart card
	SW1 = btRecvBuffer[dwRecvLength -2];
	SW2 = btRecvBuffer[dwRecvLength -1];
	//Calcola il codice di ritorno
	nSCCode = (SW1 * 256 + SW2);
	//se diverso da 0x9000 errore della smart card
	if(nSCCode != 0x9000)
		return nSCCode;
	//se il response è richiesto copia la risposta nel buffer allocato
	if(pbtResponse != NULL)
	{
		//copia il response
		memcpy(pbtResponse, btRecvBuffer, dwRecvLength - 2);
		//imposta la lunghezza del response
		*pdwRespLen = dwRecvLength - 2;
	}
	return SCARD_S_SUCCESS;

}
il problema è che la funzione SCardTransmit mi ritorna 14 come valore anzichè 0. Qualcuno mi sà aiutare?
Ho utilizzato Visual Studio .NET 2003
Rigranzio chiunque mi sà dare una mano