04-11-2008 04:30 AM
04-11-2008 08:51 AM
04-14-2008 03:16 AM
04-14-2008 08:43 AM - edited 04-14-2008 08:44 AM
05-14-2008 05:11 AM
05-14-2008 08:56 AM
05-15-2008 06:10 AM
Hello,
this is the code that calls the start_canoe() routine from the dll:
int CVICALLBACK start (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
{
switch (event)
{
case EVENT_COMMIT:
Initialize_testnew ();
testnew_clasa__Create (&hTest, 0);
testnew_clasa_start_canoe (hTest, 0);
Close_testnew ();
break;
case EVENT_RIGHT_CLICK:
break;
}
return 0;
}
This is the VB code for the testnew.dll file:
Public
Class clasa Public Sub start_canoe() Dim CAN As CANoe.ApplicationCAN =
New CANoe.Application End SubEnd
ClassThis project also has a reference to CANoe 6.1 Type Library (Vector.CANoe.Interop.DLL) which uses the COM server to communicate with CANoe.
Below is the error message that I get when I run the program from CVI:
NON-FATAL RUN-TIME ERROR: "c:\...\target instrument\target.c", line 95, col 5, thread id 0x00000A20: Function CDotNetInvokeGenericMember: (return value == -6571 [0xffffe655]). The target invoked by the LabWindows/CVI .NET Library threw an exception.
This is the code refered by line 95 in the target.c file (from the generated target instrument):
__errChk(CDotNetInvokeGenericMember(
__assemblyHandle,
"testnew.clasa",
__instance,
CDOTNET_CALL_METHOD,
"start_canoe",
0,
0,
0,
0,
0,
0,
0,
0,
__exception));
Hope this helps, looking forward for your answer.
Thanks.
05-15-2008 09:58 AM - edited 05-15-2008 09:59 AM
05-19-2008 02:57 AM
05-19-2008 09:49 AM