LogoClawIndex
CasesSkillsAbout
LogoClawIndex

dotnet-native-marshaling - P/Invoke marshaling between C# and C++ Engine

Manage P/Invoke marshaling between C# and C++ Engine

Tags

Updated: 2026-02-13

Capabilities

Typical Inputs

Typical Outputs

What this skill does

  • Define NativeBindings
  • Handle unsafe pointers
  • Bridge libengine.so
  • Map C++ types to C#
  • Implement DllImport functions
  • Create type-safe wrappers

Inputs

  • libengine.so
  • engine.dll
  • interop_api.h header
  • Type mapping definitions
  • C++ function signatures
  • Memory layout specifications

Outputs

  • NativeBindings.cs files
  • Marshaled structs
  • Type-safe wrapper classes
  • DllImport declarations
  • Memory allocation wrappers

Requirements

  • Linux or Windows OS
  • NativeLibrary.SetDllImportResolver
  • [StructLayout(LayoutKind.Sequential)]
  • [MarshalAs] attributes
  • CallingConvention.Cdecl
  • C++/CLI interop capability

Source

  • Spec: SKILL.md

ClawIndex

OpenClaw Skills & Use Case Index

ClawIndex is an ecosystem-driven index of OpenClaw skills and real-world use cases.

Index

Skills·
Cases

Meta

About·
Disclaimer·
Email·
GitHub
© 2026 ClawIndex All Rights Reserved.
interop
marshaling
P/Invoke
native-code
C#
C++
Define NativeBindings
Handle unsafe pointers
Bridge libengine.so
Map C++ types to C#
libengine.so
engine.dll
interop_api.h header
NativeBindings.cs files
Marshaled structs
Type-safe wrapper classes