So I am working with a c# wrapper to a C++ library, and trying to add another function. I have created the function declaration in C# and it is working. But it only works once. When I try to run it the second time, the program hangs.
The interop definitions and declarations are at https://github.com/joshglenn/interception-cs/blob/master/kchordr/Program.cs
the code I am running is here: https://github.com/joshglenn/interception-cs/blob/master/kchordr/InterceptionDemoForm.cs
The function that runs fine the first time but hangs on the second launch is GetHardwareID().
My question is, how can I troubleshoot this? Does this appear to be a memory leak?