11-19-2009 08:41 PM
11-20-2009 04:36 AM - edited 11-20-2009 04:38 AM
coolfire wrote:
So now is there no way to complete this work ?
There is always a way. But sometimes you need to think outside of the box! Instead of callbacks you can also use Windows system events, if you have such a bad advrsery against polling. You can setup an event in CVI using Windows APIs, pass the handle to LabVIEW and using Windows APIs in LabVIEW too, trigger that event!
There are other ways imaginable where you write a DLL in CVI that provides an API function that can be called by LabVIEW through the Call Library Node and that in turn calls the callback function pointer LabVIEW passes to that function as one of the paramete. Just use your fantasy and think!
11-20-2009 07:18 AM
rolfk 写:
There is always a way. But sometimes you need to think outside of the box! Instead of callbacks you can also use Windows system events, if you have such a bad advrsery against polling. You can setup an event in CVI using Windows APIs, pass the handle to LabVIEW and using Windows APIs in LabVIEW too, trigger that event!
There are other ways imaginable where you write a DLL in CVI that provides an API function that can be called by LabVIEW through the Call Library Node and that in turn calls the callback function pointer LabVIEW passes to that function as one of the paramete. Just use your fantasy and think!
Message Edited by rolfk on 11-20-2009 11:38 AM
Thanks!
I think there should be a way just like you said the first method,but I am not sure it and dont know how to do .Thank you for letting me make it clear. Are there examples for that "You can setup an event in CVI using Windows APIs, pass the handle to LabVIEW and using Windows APIs in LabVIEW too, trigger that event!" ? Now I do not know how to do specific.
Another,about the second method, is the main program must be running and generate in the labview ?
11-20-2009 07:27 AM