Marshaling (
marshalling) refers to the process of converting types between
managed code (managed code C#) and unmanaged code (unmanaged code C++)
Due to the fact that many types in the
unmanaged environment do not have the same types in the
managed environment, you need to create transformations that will convert
managed types to
unmanaged types and vice versa; And this is what is called the marshaling process.
Marshaling is used when you want to call
C++ code from
C# code.
For example, from
C# code access functions Windows API or use COM components ...