Click here to Skip to main content
15,898,939 members
Home / Discussions / C#
   

C#

 
GeneralRe: execute jar file in c# Pin
CreativeR867-Mar-08 21:24
CreativeR867-Mar-08 21:24 
GeneralRe: execute jar file in c# Pin
Luc Pattyn8-Mar-08 1:31
sitebuilderLuc Pattyn8-Mar-08 1:31 
GeneralRe: execute jar file in c# Pin
CreativeR868-Mar-08 1:44
CreativeR868-Mar-08 1:44 
GeneralRe: execute jar file in c# Pin
Luc Pattyn8-Mar-08 2:58
sitebuilderLuc Pattyn8-Mar-08 2:58 
Generaldetermining transfer rate Pin
damianrda7-Mar-08 6:26
damianrda7-Mar-08 6:26 
GeneralRe: determining transfer rate Pin
snorkie7-Mar-08 9:56
professionalsnorkie7-Mar-08 9:56 
GeneralDatagridview insert and delete problems concurrency error Pin
Member 39465827-Mar-08 6:10
Member 39465827-Mar-08 6:10 
QuestionSCardTransmit C# error Pin
fuffoso7-Mar-08 4:28
fuffoso7-Mar-08 4:28 
I'm not able to send APDU to a smart card using winsCard library.
I'm developing in C# 2005, probably the problem is in the definition of
SCardTransmit on winscard or in parameter I'm trying to pass.

if I use the following definition on winscard, SCardTransmit returns 22...

static extern uint SCardTransmit(uint hCard, IntPtr pioSendPci, byte[]
pbSendBuffer, int cbSendLength, ref SCARD_IO_REQUEST pioRecvPci, ref byte[]
pbRecvBuffer, ref int pcbRecvLength);

SCARD_IO_REQUEST ioRecv = new SCARD_IO_REQUEST();
ioRecv.cbPciLength = 0;
byte[] pbRecvBuffer = new byte[2];
int pcbRecvLength = 2;
byte[] pbSendBuffer = { (byte)0x00, (byte)0xA4, (byte)0x04, (byte)0x00, (byte)
0x0A, (byte)0x65, (byte)0x78, (byte)0x6D, (byte)0x5F, (byte)0x77, (byte)0x61,
(byte)0x6C, (byte)0x6C, (byte)0x65, (byte)0x74, (byte)0x00 };
int cbSendLength = pbSendBuffer.Length;
IntPtr pioSendPci = GetPciT0();
uint errors = SCardTransmit(hCard, pioSendPci, pbSendBuffer, cbSendLength,
ref ioRecv, ref pbRecvBuffer, ref pcbRecvLength);


if I use the definition below the error is 2148532243...

uint errors = SCardTransmit(hCard, new SCARD_IO_REQUEST(), pbSendBuffer,
cbSendLength, ioRecv, ref pbRecvBuffer, ref pcbRecvLength);

SCARD_IO_REQUEST ioRecv = new SCARD_IO_REQUEST();
ioRecv.cbPciLength = 0;
byte[] pbRecvBuffer = new byte[2];
int pcbRecvLength = 2;
byte[] pbSendBuffer = { (byte)0x00, (byte)0xA4, (byte)0x04, (byte)0x00, (byte)
0x0A, (byte)0x65, (byte)0x78, (byte)0x6D, (byte)0x5F, (byte)0x77, (byte)0x61,
(byte)0x6C, (byte)0x6C, (byte)0x65, (byte)0x74, (byte)0x00 };
int cbSendLength = pbSendBuffer.Length;
IntPtr pioSendPci = GetPciT0();
uint errors = SCardTransmit(hCard, new SCARD_IO_REQUEST(), pbSendBuffer,
cbSendLength, ioRecv, ref pbRecvBuffer, ref pcbRecvLength);

I've tried changing length of the response, the reference of parameters,
passing null pointer, ecc... but nothing changes.
If you have some advice or better some sample code, it's really appreciated

Thanks in advance
NewsHelp me to encrypt text file into an image Pin
thucbv7-Mar-08 2:58
thucbv7-Mar-08 2:58 
GeneralRe: Help me to encrypt text file into an image Pin
DaveyM697-Mar-08 3:14
professionalDaveyM697-Mar-08 3:14 
AnswerRe: Help me to encrypt text file into an image Pin
thucbv7-Mar-08 4:48
thucbv7-Mar-08 4:48 
GeneralRe: Help me to encrypt text file into an image Pin
Russell Jones7-Mar-08 3:57
Russell Jones7-Mar-08 3:57 
GeneralRe: Help me to encrypt text file into an image Pin
CPallini7-Mar-08 5:17
mveCPallini7-Mar-08 5:17 
QuestionHow to identify bookmarks and hyperlinks in a pdf file Pin
Member 42489617-Mar-08 2:49
Member 42489617-Mar-08 2:49 
GeneralRe: How to identify bookmarks and hyperlinks in a pdf file Pin
Justin Perez7-Mar-08 4:10
Justin Perez7-Mar-08 4:10 
QuestionHaving a file browsing property in a property sheet Pin
Le centriste7-Mar-08 2:36
Le centriste7-Mar-08 2:36 
GeneralRe: Having a file browsing property in a property sheet Pin
stancrm7-Mar-08 2:51
stancrm7-Mar-08 2:51 
GeneralRe: Having a file browsing property in a property sheet Pin
Le centriste7-Mar-08 3:02
Le centriste7-Mar-08 3:02 
QuestionHelp in User Control implemented using Callbacks Pin
Neeraj Kr7-Mar-08 0:49
Neeraj Kr7-Mar-08 0:49 
Questiontwo filters in List class find function Pin
Sonia Gupta6-Mar-08 23:23
Sonia Gupta6-Mar-08 23:23 
GeneralRe: two filters in List class find function Pin
Pete O'Hanlon6-Mar-08 23:32
mvePete O'Hanlon6-Mar-08 23:32 
GeneralRe: two filters in List class find function Pin
Giorgi Dalakishvili6-Mar-08 23:34
mentorGiorgi Dalakishvili6-Mar-08 23:34 
GeneralRe: two filters in List class find function Pin
J4amieC7-Mar-08 2:25
J4amieC7-Mar-08 2:25 
GeneralRe: two filters in List class find function Pin
Pete O'Hanlon7-Mar-08 3:37
mvePete O'Hanlon7-Mar-08 3:37 
GeneralRe: two filters in List class find function Pin
J4amieC7-Mar-08 4:20
J4amieC7-Mar-08 4:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.