my c# code is windows app so console commands dont work, sorry i realised i didnt mention this and edited my first post to include this.
so it errors saying "InvalidOperationException was unhandled" "Cannot see if a key has been pressed when either application does not have a console or when console input has been redirected from a file".
because im calling the DLL in a thread my C# program continues which is fine my issue is causing the C DLL which is a cut down version of the ps2000con.c in the SDK to exit the collect data while loop, which looks like:
- Code: Select all
while (!_kbhit() && !g_autoStopped && !g_overflow)
so i need to set kbhit or autostopped to make it stop collecting data. but i need to do this from the c# code to the DLL.
I have attached the code incase it helps.