I am migrating a VB6 app to a C# app and need to call this dll with different parameters. It is used similarly to WinScard.dll.
This is the declaration I am using:
[DllImport("MCSCM.dll")]
static extern int MCardInitialize(
IntPtr hScardContext,
string cReaderName,
ref long phMCardContext,
ref long pdwDLLVersion
);
This line returns an internal error value instead of 0 for success:
lReturn = Convert.ToInt64(MCardInitialize(mhSCardCtx, sReaderName, ref hMCardCtx, ref dwDLLVersion));
The MCSCM.dll file is in the C:\Windows32 and C:\SYSWow64 folders.
Thank you for any help.
What I have tried:
I have looked it up on Google. It said to register it running a registry command to be used as a reference. A co-worker found an answer here for the WinScard.dll and hoped to find a simil ar answer for MCSCM.dll.