Monthly Archives: August 2017

How to build an Hybrid Application using Visual C++ and .NET

On my Modeler application I want to code the feature of importing .NET types of any assembly to class development shape. To be successful, I need to use Reflection to enumerate types. So I begin to code that using C# as a stand alone assembly (dll):

Now, I have the data structure that contains all the assembly names for a dedicated assembly.

I will use my Modeler application to call this pseudo piece of code:

  • Open a File dialog box to select an assembly
  • Call the AssemblyExtractor assembly routines by passing the assembly name as a parameter
  • Get a List<ExtractorData> that contains the data
  • For each element, Add a development shape of class’s type and
  • Calculate a position on the screen for each element data

Here the C++ code that contains C++/CLI calls. In the same C++ file, i can call CLR routines because my project is configured to accept the CLR support.

My Modeler application is built using UNICODE. Strings are wide char alias wchar_t *. Here is the source code in the C++ file:


You can see I call the Extractor class in the C++ code !!! I manage String^ and List<T> datatypes. To enable this, I have added a reference of the AssemblyExtractor assembly to the project.

Here is the result:


Only C++ allows to mix C++ and C++/CLI .NET code. It is amazing…



Microsoft Premier Support – Last 6 months

During 6 months, I have been a Microsoft Support Premier Engineer. Here are all the technologies I worked with:

  • C#, Linq, XML, Web Services WCF, ADO.NET, Entity Framework, VSTS, Git, ASP.NET WebForms, ASP.NET MVC
  • SQL Server, Oracle
  • Debugging C# / .NET
  • Debugging C++
  • C++, Win32, MFC

Missions were done on customer sites or remote at Microsoft France building.