L
Levi Fan
hi everyone,
I want to get the all smart card reader in my pc by calling winscard.dll,
but the reader name was truncated. its length just has 20 char, but my
reader name is about 40 char when it is displayed in device manager.
who can help me to solve it? below is my source code:
[DllImport("WinScard.dll")]
public static extern uint SCardListReaders(int hContext, string
cGroups,
ref string cReaderLists, ref int nReaderCount);
public IEnumerable<string> ListReaders(string group)
{
int stringSize = -1;
string cReaders = "\0";
uint retVal = NativeMethods.SCardListReaders(nContext, group,
ref cReaders, ref stringSize);
CheckReturnValue(retVal);
if (cReaders == null)
cReaders = "";
return cReaders.Split('\0');
}
the reader is GemPC410, and it is a stardard PC/SC smartcard
thanks
Levi Fan
I want to get the all smart card reader in my pc by calling winscard.dll,
but the reader name was truncated. its length just has 20 char, but my
reader name is about 40 char when it is displayed in device manager.
who can help me to solve it? below is my source code:
[DllImport("WinScard.dll")]
public static extern uint SCardListReaders(int hContext, string
cGroups,
ref string cReaderLists, ref int nReaderCount);
public IEnumerable<string> ListReaders(string group)
{
int stringSize = -1;
string cReaders = "\0";
uint retVal = NativeMethods.SCardListReaders(nContext, group,
ref cReaders, ref stringSize);
CheckReturnValue(retVal);
if (cReaders == null)
cReaders = "";
return cReaders.Split('\0');
}
the reader is GemPC410, and it is a stardard PC/SC smartcard
thanks
Levi Fan