Re: Re: .NET v 1.3 library

[ Follow Ups ] [ BasicCard User Forum ]

Posted by andersa ( on July 12, 2011 at 07:51:10:

In Reply to: Re: .NET v 1.3 library posted by johnd on April 29, 2009 at 05:34:17:

I am trying without success to make the .Net library work with the virtual readers/cards (waiting for dev. cards).

I have no trouble running the provided examples by:
- Launching cards and/or terminals from the ZC Basic IDE
- Launching cards (.ZCC) and/or terminals (.ZCT) directly from windows explorer (opens in separate ZC debug windows)
- Launching card images together with terminal images from the prompt using ZCMSim.EXE

However I fail to make the .Net Examples (C#) to detect any virtual readers and the log file reports:
7/12/2011 11:32:28 AM : Exception "CardReaderException: 00000001" in class VirtualReaderFactory method static VirtualReaderFactory

I have tried:
- Launching the .Net example first and the then launching the card (running .ZCT from windows explorer)
- Launching the card (running .ZCT from windows explorer) first and then the .Net example
- Launching the .Net example and repeatedly inserting/removing the virtual card from different 'ports' in the ZC IDE

In either case, the CardReaderObserver.Instance reports no connected readers.

If I connect a physical reader (OMNIKEY CardMan 3121) it is however discovered.

My environment is as follows:
- Windows XP SP 3 on a HP Intel Core2 Duo 2.33 GHz, 3.5 GB RAM
- Visual Studio 2010 Ultimate
- BasicCard v7 installed into 'C:\Program Files\BasicCardV7\'
- BasicCard .Net v1.0 (v1.3?) installed into 'C:\Documents and Settings\Anders\My Documents\BasicCard\Net13\'
- Compiled the card (.ZCC) for ZC3.43 rev B (which is the card we will ev. use) assigned to virtual reader COM201 and physical reader COM1
- Included the depending dlls into the project:
o BasicCard.dll
o BasicCardDebug.dll
o ZCLib.dll
o ACPLibNet.dll
- Modified the file (in exe dir) to only include the VirtualReaderFactory and set SerialPorts to only 201
- Copied the dlls from 'C:\Program Files\BasicCardV7\' to the project output folder (to fix some dependency issues I had early on)
without those dlls I got the following error in the log file:
7/12/2011 12:04:50 PM : Exception "The type initializer for 'BasicCard.Terminals.VirtRdr.VirtualReaderFactory' threw an exception." in class SystemCardReaderFactory method LoadFactoryClass

To the best of my understanding 'CardReaderException: 00000001' indicates a stack overflow exception, but I fail to understand why.

Any help on this would be greatly appreciated.

Follow Ups:

[ Follow Ups ] [ BasicCard User Forum ]