Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

System.Runtime.InteropServices.COMException' occurred after installation of National Instruments

Hi, we are using National Instruments for Graph control in our software. I recently installed the new measurement studio 8 together with the drivers and since then our software in my machine produces this exception everytime I interact with the graph control:          

System.Runtime.InteropServices.COMException

at the start of the application. I cannot see where this is coming from. I tried uninstalling all NI software but this is still happening. The graph seems displaying correctly but I am concern that this will cause some problems. I think previously we are using NI for studio 6.0, should I reinstall using this older version? Any suggestions?

0 Kudos
Message 1 of 9
(13,655 Views)
Hi aster,

From the description of your error, it sounds like you are trying to use an ActiveX control and not the .NET assemblies. Is there a specific reason why? The UI controls should work fine but there are some ActiveX controls that are not supported in .NET, refer to this Knowledgebase article for more information.   Is there any other text to the error message?  This is usually an error that results from a type mismatch. 

Have a great day,

Ecleamus Ricks, Jr.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 9
(13,643 Views)

Thank you for your reply. We are in the process of moving out from the ActiveX usage. Answering the question of error message i think the only thing that pops up during debugging is a message saying something like unknown error.

0 Kudos
Message 3 of 9
(13,638 Views)
Hi aster,

Could you post a screenshot of the error message?

Thanks,
0 Kudos
Message 4 of 9
(13,617 Views)

This is the exact message:

A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in system.windows.forms.dll

Additional information: Unknown error

0 Kudos
Message 5 of 9
(13,616 Views)
Hi aster,

Does the error occur at edit time, run time, or both?

Regards,
0 Kudos
Message 6 of 9
(13,600 Views)
at runtime.
0 Kudos
Message 7 of 9
(13,598 Views)
Hi aster,

Could you post the line or lines of code around where this error occurs

?

Regards,
0 Kudos
Message 8 of 9
(13,581 Views)
This is just a guess, but you can try regenerating the Interop assemblies for the Activex graph that are referenced in your .NET application. Open a new project, and drop the graph on it. VS will regenerate the COM interop assemblies for the graph. See if the problem shows up there.

Then take those interop assemblies generated by this test project, rename the assemblies in your current problematic project and add the ones from the test project.

Hope this helps.
Bilal Durrani
NI
0 Kudos
Message 9 of 9
(13,567 Views)