I am developing an LV 7.1 instrument driver for our ActiveX Automation Server component developed using MFC, for an industrial video camera device. This component works correctly with VC++, C# and PiXCL 6 development environments, but is problematic with LV, generating Server errors, usually in the second test pass. I found several issues that are unique to LV.
a) Our component presents a video stream dialog that expects to find the parent window of the calling app to set the window size and position, but LV curiously does not provide one (all other tested environments do). Fixing this was simple: just check for a null window handle and set some size and position defaults.
b) The video stream dialog also gets its template from our component. It was necessary to add an MFC AFX_MANAGE_STATE call to the dialog startup code so that the component looked in itself for the resources, rather than to LV, which causes a Server error and (eventually) LV crash. Its necessary to shut down LV and restart it to clear the Server error.
c) an Initialize - display video - close test VI runs correctly the first time with no obvious errors, but the second time through the display video call generates the Server error. A series of component embedded message boxes appear as a topmost window, but some get hidden behind a LV window (ie LV has regained the focus). This suggests that LV is switching back and forth between the component and LV process states in a non-obvious manner. I understand that the problem has to be corrected in my code, but I need some more ideas of where to look.
Is there a description of what LV does when its accessing or controlling an ActiveX component, and what might cause LV to get a Server error? eg is LV changing the focus or the current directory or losing track of the path to the ActiveX component?