Blogs

Marshaling C++ string, a std::string or std::wstring in C#

Marshaling C++ std::string in C# is possible and doable and it is done Marshaling C++ std::string in C# is difficult, developers asked questions for help on the web everywhere for many years since .NET was born and PInvoke Interop became a must between C++ and .NET.(C++/CLI uses PInvoke as well, it is implicit P/Invoke, the actual P/Invoke implementation is invisible to the developers, but it still uses P/Invoke), I have a list of questions asked on the web here, they are all different situations, but all they want to do is to able to marshal or access the std::string from...

Creating and Accessing Instantiated std::vector Template Class from .NET

C++ Vectors are sequence containers representing arrays of certain data type, which can change in size. It is widely used by lots of C++ application, if we did not include in our C# wrapper library for C++ DLL, it would be very difficult for the C# wrapper generator to create wrapper classes for C++ class automatically and smoothly since lots of classes may contain interfaces using std::vector of any data type, it is so common that we just would not be able to ignore it. A template class is not a concrete class until it gets instantiated, so a vector...

A C# .NET Wrapper Library for Standard C++ Classes

In order for our C# wrapper generator for C++ DLL to automatically generate C# source code for C++ DLL, we would have to have a C# wrapper library for the standard C++ run-time library first. Since we were already writing the C# wrapper generator, we used the C# wrapper generator to create the C# wrapper library for the C++ standard run-time classes after some fine-tuning specifically done to the C# wrapper generator for C++ standard classes. Here are the list of all the C# wrapper classes in the C# wrapper library and the corresponding standard C++ classes. List C# Wrapper...

Introduction to C# PInvoke Interop SDK for C++ DLL

A C# .NET Managed Wrapper Generator for Wrapping Native C++ DLL Automatically A tool capable of creating C# .NET managed wrappers for native C++ DLLs instantly   xInterop NGen++ 2.0 has been released We are so excited to announce that we are about to release our C# .NET PInvoke Interop SDK which includes a C# .NET ( PInvoke ) Managed Wrapper Generator for native unmanaged C++ DLLs and a C# .NET Managed library for wrapping native C++ standard classes exported in a C++ native unmanaged DLL via PInvoke. It is in beta-testing right now. For years, developers have been struggling...
1 3 4
Translate »