LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Polling DDE messages while doing something else (within CVI-made DLL, not standalone application)

Hi! This may be a hard one to describe, hopefully easier to solve...!

I've got an "engine DLL" (no user interface) that integrates to LabView via Active-X (it 'calls' LabView-based .vi's for some stuff).

The called LabView vi's may report progress back to the calling DLL. We've tried to make this via a DDE server that the DLL registers. The server works, but if called from LabView (which was called by the DLL 🙂 nothing happens. The program is stuck.

Problem seems to be (my guess) that the Windows DDE messages never get polled from the message queue. So I put the DDE server in another thread and called 'ProcessSystemEvents()'. No help.

What exactly should 'ProcessS
ystemEvents()' do and am I on the right track here? May it be called from any thread or are there limitations?

Would there be a better way of implementing "callbacks" back from VI to C?

Yours, - asko.kauppi@fi.flextronics.com
0 Kudos
Message 1 of 3
(2,943 Views)
I'm thinking that you wouldn't want to use DDE unless you are forced. It might be a better idea to use ActiveX. You can use LabVIEW to act as the server. There is a great example of doing this on NIs website. You reference the EPD at http://zone.ni.com/devzone/explprog.nsf/6c163603265406328625682a006ed37d/08d9093fcfaa711a8625689400570451?OpenDocument
0 Kudos
Message 2 of 3
(2,943 Views)
I wouldn't want to use Active-X unless I'm forced to... 🙂 Actually, the example you referred to was very familiar. That's what we have based our CVI-to-LV calling on. And that is working.

Now the problem is how to "call back" and tell there's progress in the LV side. There's plenty of alternatives but I just need some that works.

- asko
0 Kudos
Message 3 of 3
(2,943 Views)