Status Change

I had been working on xInterop C++ .NET Bridge during my spare time for 6 years before I finally gave up a few months ago due to the lack of sales. I no longer offer trial any more, the download link has been removed.

I am currently looking for new job in Washington, DC area(remote is also fine), any job related to C/C++ and C# (Except web application) on Windows would fit me quite well. Please do not hesitate to reference/contact me if your company has any job available, in return, I will offer you a free copy of professional version of xInterop C++ .NET Bridge which contains both Native C++ to .NET Bridge and .NET to Native C++ Bridge.

xInterop C++ .NET Bridge 4.0 is available now

xInterop C++ .NET Bridge 4.0 is available now

We are pleased to announce the release of xInterop C++ .NET Bridge 4.0, a Code Generator for Creating Two-Ways Bridges between C++ Native World and .NET World. Visual Studio 2017 is now supported.

xInterop C++ .NET Bridge 4.0 is available to the public for evaluation to anyone who is interested in using xInterop C++ .NET Bridge to

  • Generating C# .NET Wrapper/Bridge for native C++ DLLs so that you can call native C++ DLL from .NET.
  • Generating C++ Native DLL Bridge for .NET assemblies so that you can call .NET assemblies from native C++.

You may want to download it from the link below and start evaluating it and experiencing how powerful xInterop C++ .NET Bridge is. Once you start using xInterop C++ .NET Bridge, you will find that it is so easy to bridge between the C++ native world to C# .NET managed world by using xInterop C++ .NET Bridge. You will be able to evaluate the software for free for 30 days.

 

To anyone who is interested in purchasing xInterop C++ .NET Bridge, the licensing model and pricing document is available to you upon request. If you have any questions regarding xInterop C++ .NET Bridge software, licensing or pricing, please feel free to contact us using the Contact Us Page.

Ultimate Guide to Call .NET Assembly from Native C/C++ Using Unmanaged Exports

I have been mentioning Unmanaged Exports in a few of my articles, which is a very basic technique allowing us to export managed methods from .NET world to native C and C++. The resulting assembly is a mixed mode DLL containing native-like export entry. You can use Unmanaged Exports Nuget Package to create such DLLs, As long as you can write the native C/C++ declaration of the functions correctly, you should be able to create export function with simple and primitive types. But I went further to write an article named Unmanaged Exports, An Ultimate Guide to Call .NET Assembly from Native C/C++ Using Unmanaged Exports, once you learn those advanced tips, you should be able to even export classes, structs.

Calling .NET from Native C++: How to receive C# event

There are a few other technologies we can use to call .NET from native C++ as shown in Introduction to Native C++ to .NET Bridge, such as C++/CLI, COM, Reverse P/Invoke, Unmanaged DllExport, but none of them are easy to implement receiving events from .NET as xInterop Native C++ to .NET Bridge is.

Let’s write a sample assembly to demonstrate how we can receive C# .NET events from .NET using native C/C++ code. The sample assembly is quite simple, it has only one class named SimpleWebClient which implements a method named DownloadStringAsync and an event named DownloadStringCompletedEventHandler, as you see, SimpleWebClient basically wraps method and even from the class of WebClient.

With Native C++ to .NET Bridge, we can easily create the native C++ bridge DLL and a testing application to test the resulting native DLL.

The following is the corresponding C++ native bridge class, EventSample::SimpleWebClient which bridges to the C# class, SimpleWebClient.

DownloadStringCompletedEventHandler

The following is the code demonstrating how we can receive the C# .NET event from native C++

I am also posting the Uri bridge class if you are interested.

 

Translate »