hi can anyone help me regarding the smart card API SCardLocateCard sW
here is the code i am sending which i have written
[DllImport("wins card.dll", SetLastError = true)]
internal static extern int SCardLocateCard sW(UInt32 hContext, [MarshalAs(Unman agedType.LPTStr )] string mszCards, [In, Out] SCard_ReaderSta te[] rgReaderStates, int cReaders);
int nbReaders;
SCard_ReaderSta te[] readerState = new SCard_ReaderSta te[1];
// UInt32 eventState = readerState[0].m_dwEventState ;
readerState[0].m_dwCurrentSta te = (UInt32)CARD_ST ATE.UNAWARE;
readerState[0].m_szReader = (string)reader;
nbReaders = readerState.Len gth;
string card1 = "Axalto Cryptoflex .NET";
//string[] card = { "Infineon SICRYPT CardModule Card", "Axalto Cryptoflex .NET" };
//card[0]= "Infineon SICRYPT CardModule Card";
//card[1]="Axalto Cryptoflex .NET";
//string card = "";
int nErrCode = SCardLocateCard sW(m_hContext,c ard1,readerStat e, nbReaders);
if (nErrCode != 0)
{
string msg = "Failed SCardLocateCard sA error: " + nErrCode;
throw new Exception(msg);
}
the code is throwing an error
i am not knowing wht to pass in the mszcards
can anyone help me
i need this
thanks in advance