01-28-2011 02:06 AM
Hi,
I want to pragrammatically fire an event in a VI in a LabVIEW-generated DLL, so that the event can be handled by a VC++ program that calls the LaVIEW-generated DLL.
I will appreciate it if someone solve my problem at the earliest.
Thanks and regards!
Javed
01-28-2011 05:08 AM
@JavedAhmed wrote:
I want to pragrammatically fire an event in a VI in a LabVIEW-generated DLL, so that the event can be handled by a VC++ program that calls the LaVIEW-generated DLL.
I will appreciate it if someone solve my problem at the earliest.
Since this is a volunteer board for a large part your hope to solve your problem at the earliest is more or less irrelevant since nobody owes you anything here.
As to your problem it sounds a lot like a roundabout way of doing business. The most easy solution would be probably to let your C program register a Windows API event and give the handle to your LabVIEW VI as a pointer sized integer, then whenever your VI wants to fire that event it calls the according SetEvent() Windows API function passing it that handle. In your C program you have to wait on that event of course probably in a spawned thread.
01-28-2011 05:28 AM
Thanks for your prompt response. Of course! You are right. No one owes me to reply to me at the earliest. It was just a request.
Back to the technical side, can you please send me an example how to register a Windows API event and pass its handle to a LabVIEW program which may fire the event which can be handled in a VC++ program?
Can we make an ActiveX of a VI and fire the event that can be handled in other ActiveX-supporting languages?
Regards,
Javed
01-28-2011 05:59 AM