0

I have a WPF application in C# 8 on .NET 4.8 on the latest version of windows 10 in VS 2019. It prints & writes mifare cards on a zebra ZC 350 printer via the link OS SDK of zebra.

It works fine when run inside Visual studio (in debug mode) but when I run the standalone exe it crashes when the application tries to write the mifare tag/chip via the winscard dll (C# calls win32/winscard.dll native code). It crashes with an AccessViolationException. Normally you would think there is a pointer bug in the native code of winscard.dll but it works inside Visual studio...

I don't know how to solve this. Googling did not provide any answers. Anybody ever experienced the same thing or something similar? What's the solution?

Thanks!

  • Maybe take a look here https://stackoverflow.com/questions/3312003/is-it-possible-to-catch-an-access-violation-exception-in-net – keuleJ Jan 28 '20 at 20:24
  • and maybe this: https://blog.elmah.io/debugging-system-accessviolationexception/ – keuleJ Jan 28 '20 at 20:37

0 Answers0