What problem does it solve?
This Skill helps developers correctly and safely call native C/C++ libraries from .NET applications, preventing common crashes and data corruption issues.
Core Features & Use Cases
- Signature Mapping: Translates native C/C++ function signatures and data types into their correct .NET equivalents.
- Memory Management: Guides on correctly handling memory allocation, deallocation, and lifetime across the managed/native boundary.
- Use Case: You need to wrap a C library for use in a .NET Core application. This Skill will help you define the correct P/Invoke signatures, manage string marshalling, and ensure native handles are properly released.
Quick Start
Use the dotnet-pinvoke skill to generate a C# signature for the native C function int process_records(const Record* records, size_t count, uint32_t* out_processed); given the Record struct definition.