Mixing C++ and C++/CLI .NET code in the same module

To manipulate the data about methods, fields and properties, I have to call the .NET assembly i have created. I just make a reference to this .dll only if my app supports the /clr compiler option.

Here are the structure of the data I will get from .NET assembly:

The method that is linked to the Ribbon icon “Import .NET Module” is shown below. I just call the CFileDialog to choose an assembly and then I call the .NET code. As you can see, the .NET code is called using C++/CLI with the ^(hat) symbol to define objects. In the .NET C# mode you don’t see it is a pointer to an object but in C++/CLI you have to declare it with the specific syntax. Once the method is called, I just take every data and put it in C++ classes.

Here is the code:


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: