Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

I've got a problem with dll files build with .NET

I've got a dll file build in .NET and i'd like to use it with labwindows in a project, but i haven't prototypes files. Is it possible? Is someone able to reply to my question?
0 Kudos
Message 1 of 3
(3,486 Views)
Hi Gildaslet,
 
It sounds like what you're trying to do is use a .NET assembly in C the way you would typically use a Dynamic-Link Library, by calling into one of its methods.  Although .NET assemblies and DLL's share the same file extension (.dll), they are actually distinct from one another.  Microsoft decided to use the .dll extension because a .NET assembly is supposed to accomplish the same general purpose as a DLL, but the file format is quite different.  C++ applications can use .NET assemblies if they are built using Managed Extensions for C++ (or with the release of Visual Studio 2005, C++/CLI), but unfortunately C has no direct support for using .NET assemblies. 
 
However, there still might be a way to do this.  According to this information on COM, .NET objects may be used in COM objects by calling a COM callable wrapper, which you could create for your assembly. Then, you could create COM objects which use the .NET objects and then use the COM objects in your C application. This is not a very elegant solution but it just might work.
Hexar Anderson
Measurement Studio Staff Software Engineer
National Instruments
0 Kudos
Message 2 of 3
(3,467 Views)
Hello, Gildaslet
 
Actually, the next version of CVI will allow you to do precisely that: it will allow you to call into a .NET assembly from inside a CVI application.
 
If you would like to try this out, you can sign up for the CVI beta now. The beta program is about to close, but you can still get in if you sign up in the next day or two. Just go to ni.com\beta and follow the directions.
 
Luis
NI
Message 3 of 3
(3,448 Views)