09-18-2009 08:06 AM
Hi at all,
I am trying to write an interface between 3thr party hardware (Cams) an LabVIEW in C++. So I will synchronize C++ thread with LabVIEW by PostLVUserEvents. Because we have more cameras and also SDK's (software developer kit) I will write most modular as I can. So I wrote abstract main class which choose the right SDK. But when I grab some images and will post as event I receive fatal error LabVIEW.lib could not locate "PostLVUserEvent". I worked with this function many times before so I don't understand why happens this error. Hope to get some support.
best regards,
Andreas Ehlen
03-22-2010 08:16 AM - edited 03-22-2010 08:17 AM
2 possible reasons come to mind:
1) You use a LabVIEW version prior to LabVIEW 7.1. This API only got available in LabVIEW 7.1 and onwards.
2) Your DLL is executed outside of the context of the LabVIEW development environment or runtime app. The function PostLVUserEvent is exported by the LabVIEW kernel either inside the development environment or the runtime engine. If your DLL is executed in the context of an out of process ActiveX server component (just as an example) it has no way to locate the labview runtime engine (and even if you pointed it to load some lvrt.dll from somewhere on disk it would not work, since that runtime engine hasn't been properly initialized by your component and can't really be initialized by someone outside of NI in any way.