ribery91720
Messages postés17Date d'inscriptiondimanche 6 janvier 2008StatutMembreDernière intervention27 mars 2009
-
27 mars 2009 à 09:38
Pistol_Pete
Messages postés1053Date d'inscriptionsamedi 2 octobre 2004StatutMembreDernière intervention 9 juillet 2013
-
27 mars 2009 à 09:53
Grace à vous j'ai trouvé.
Maintenant j'ai une nouvelle erreur dans une autre fonction.
766voidwriteString(conststringbuff)
767{
768
769// On limite la chaine à 10 caractères
770buff=buff.substr(0,10);
771
772// On copie la chaine dans le buffer
773//strncpy(&SendBuff[5], buff.c_str(), buff.size());
774copy(buff.begin(),buff.end(),&SendBuff[5]);
775// On peut aussi copier avec std::copy(buff.begin(), buff.end(), &SendBuff[5]);
776
777
778SendBuff[0]=0x80;//CLA
779SendBuff[1]=0xD2;//INS
780SendBuff[2]=0x00;//P1
781SendBuff[3]=0x00;//P2
782SendBuff[4]=buff.size();//P3
783
784dwSend=SendBuff[4]+0x05;
785dwRecv=2;
786
787ExchangeData(SendBuff,dwSend,RecvBuff,&dwRecv);// Envoi à la carte
788
789}