Skip to content

SkivHisink/MarshalingCLRSamples

Repository files navigation

MarshalingCLRSamples

This repository contains examples of using С++ code in С#. The following two common approaches are typically employed:

Marshaling

About

Marshaling is the process of converting data between different memory representations to enable communication between components with different data formats, such as managed and unmanaged code in software applications. It allows seamless data exchange by translating data structures, data types, and memory layouts to ensure compatibility and consistency during interoperation. Marshaling is commonly used in environments like .NET to facilitate communication between managed and unmanaged code and to handle data transfers across boundaries like processes or networks.

How to

  1. Create Project with DLL Configuration type. image
  2. TODO

Code samples

CLR

About

C++ to C# communication via CLR (Common Language Runtime) can be achieved by creating a managed C++ wrapper that exposes C++ functions to the .NET environment. The managed C++ wrapper serves as an intermediary, allowing C# code to call C++ functions seamlessly. This integration enables interoperability between C++ and C# codebases, leveraging the strengths of both languages in a single application.

How to

It will be written later.

Code samples

TODO

About

Guide for Using C++ or C code in C#

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published