I used labview to generate a dll with a function related to my vi. The vi file includes an infinite loop which can be stopped manually in labview at the top-left (with that red "stop" button). But when I tried to use this function (exported to a dll and called by a C program), the function just stuck.
I did try to start this function at a different thread and kill that thread, but nothing works, the vi loop just keeps running.
I wonder if there is a certain way to stop it.
I called my dll using "lib" file, so I don't have to load (dynamically) the dll in my code.
The generated header file looks like this:
#include "extcode.h"
#ifdef __cplusplus
extern "C" {
#endif
/*!
* Kx_4_ZScanning
*/
void __cdecl Kx_4_ZScanning(LVBoolean start, int32_t Laser1, int32_t Laser2,
int32_t Laser3, int32_t Laser4, int32_t k, double IfScanning,
double DCOffsetX, double DCOffsetY, LStrHandle *physicalChannels1,
LStrHandle *physicalChannels2, double frequency, double z_num,
double delta_zX10nm);
MgErr __cdecl LVDLLStatus(char *errStr, int errStrLen, void *module);
void __cdecl SetExecuteVIsInPrivateExecutionSystem(Bool32 value);
#ifdef __cplusplus
} // extern "C"
#endif