P
PvdG42
Trying to use a MagTek mag card swipe reader in a C# Win app. The only API
MagTek offers for Windows is via VB6 OCX (COM DLL). I can use the DL and its
methods in a VB .NET app with no problems, both in VS 2008 and in direct
execution of the VB app in Windows outside the IDE.
I developed a simple C# app (identical to an early VB test app), to use the
MagTek DLL, but the C# version fails to initialize the swipe reader with the
failing code found as generated in <appname>.designer.cs.
The failing statement in C#:
((System.ComponentModel.ISupportInitialize)(this.axUSBHID1)).EndInit();
The successful VB equivalent statement:
CType(Me.USBHID1, System.ComponentModel.ISupportInitialize).EndInit()
You may well ask, why not just proceed in VB? I have an associate who is
quite experienced in C#, but not in VB, and thus prefers to use C#.
I realize that I may well have failed to supply all needed info, and will on
request.
Any advice/suggestions?
TIA.
MagTek offers for Windows is via VB6 OCX (COM DLL). I can use the DL and its
methods in a VB .NET app with no problems, both in VS 2008 and in direct
execution of the VB app in Windows outside the IDE.
I developed a simple C# app (identical to an early VB test app), to use the
MagTek DLL, but the C# version fails to initialize the swipe reader with the
failing code found as generated in <appname>.designer.cs.
The failing statement in C#:
((System.ComponentModel.ISupportInitialize)(this.axUSBHID1)).EndInit();
The successful VB equivalent statement:
CType(Me.USBHID1, System.ComponentModel.ISupportInitialize).EndInit()
You may well ask, why not just proceed in VB? I have an associate who is
quite experienced in C#, but not in VB, and thus prefers to use C#.
I realize that I may well have failed to supply all needed info, and will on
request.
Any advice/suggestions?
TIA.