09-15-2006 10:04 AM
09-15-2006 01:36 PM
You can pass NULL references for these parameters if you don't want to use these parameters.
Allen P.
NI
09-17-2006 05:09 AM
09-18-2006 01:45 AM
09-18-2006 09:40 AM - edited 09-18-2006 09:40 AM
MaWie -
COM reference types in CVI are of type CAObjHandle, which are defined as:
typedef int CAObjHandle;
I would suggest passed the number zero (0) instead of NULL. NULL is defined as:
#define NULL ((void *)0)
which is why you get the pointer type mismatch error.
So typically you would define a variable like this:
CAObjHandle thread = 0;
Message Edited by Scott Richardson on 09-18-2006 09:43 AM
Message Edited by Scott Richardson on 09-18-2006 09:43 AM
09-18-2006 10:07 AM
09-18-2006 10:28 AM
MaWie -
Sorry about that. Sending the zero value would be the correct way to do it. So it appears that sending the zero values for the custom UI message are resulting in an internal error inside the Application Manager control.
09-18-2006 10:37 AM
MaWie -
When you debug the DLL, on what line does the error message "User-defined error code occur"? Can you even hit a breakpoint if you set it at the top of the event callback?
09-18-2006 01:38 PM
MaWie -
I had some more time to look at this. I could not duplicate the problem in our current source code for TestStand. It appears that the problem occured in TestStand 3.5. The error appears to be internally to TestStand UI controls. The error occurs after you process the message. The error also occurs even when you use the generic UIMessage event; however, if you set cancel for the message, the UI controls do not process it and the error does not occur.
HRESULT CVICALLBACK ApplicationMgr_OnUIMessage (CAObjHandle caServerObjHandle,
void *caCallbackData,
TSUIObj_UIMessage uiMsg,
VBOOL *cancel)
{
int error = 0;
enum TSEnum_UIMessageCodes event;
tsErrChk( TS_UIMessageGetEvent (uiMsg, &errorInfo, &event));
if (event >= 10000)
{
//process the message here
*cancel = VTRUE;
}
Error:
return 0;
}
09-19-2006 01:30 AM