03-30-2007 12:22 AM
03-30-2007 12:32 AM
Just a little more info.... GetObjHandlefromActiveXCtrl returns -45 which is "The control type passed was not a valid type". It's strange that it works when I call it one way from teststand but not the other.
04-02-2007 10:46 AM
Hi kwseitz3,
Also you may want to make sure you are running in a single threaded apartment (STA). Here is a link that talks about it:
http://digital.ni.com/public.nsf/websearch/0868E14D531C88898625706900723C13?OpenDocument
And an example:
http://zone.ni.com/devzone/cda/epd/p/id/1987
Are you able to step through the code to see when the handle is being lost?
Regards,