G
Guest
Hello,
i do not know the right p/invoke calling, i receive 2 different kinds of
errors.
1) System.Execution Engine error when i try to debug that line of code
OR
2) I receive the Invalid Paremeter from the SCardErr - 0x8010004
This is my P/Invoke for SCardStatus, do you think is correct (the
www.pinvoke.net SCardStatus does not seem to be right)
[DllImport("Winscard.dll", CharSet=CharSet.Auto, SetLastError=true)]
private static extern Int32 SCardStatus(
UIntPtr hCard,
[MarshalAs(UnmanagedType.LPTStr)]
ref string readerName,
ref UInt32 readerLength,
out UInt32 state,
out UInt32 protocol,
//[MarshalAs(UnmanagedType.ByValArray, SizeConst=33)]
out byte[] attribute,
ref UInt32 attributeLength);
// attributeLength is depends on the byte[] attribute
Any idea how to fix this problem? I just to modify many things, like 2nd
paremeter, no marshalling just a normal string, still the same.
Thanks.
i do not know the right p/invoke calling, i receive 2 different kinds of
errors.
1) System.Execution Engine error when i try to debug that line of code
OR
2) I receive the Invalid Paremeter from the SCardErr - 0x8010004
This is my P/Invoke for SCardStatus, do you think is correct (the
www.pinvoke.net SCardStatus does not seem to be right)
[DllImport("Winscard.dll", CharSet=CharSet.Auto, SetLastError=true)]
private static extern Int32 SCardStatus(
UIntPtr hCard,
[MarshalAs(UnmanagedType.LPTStr)]
ref string readerName,
ref UInt32 readerLength,
out UInt32 state,
out UInt32 protocol,
//[MarshalAs(UnmanagedType.ByValArray, SizeConst=33)]
out byte[] attribute,
ref UInt32 attributeLength);
// attributeLength is depends on the byte[] attribute
Any idea how to fix this problem? I just to modify many things, like 2nd
paremeter, no marshalling just a normal string, still the same.
Thanks.