← Back to home
Skill

dotnet-pinvoke

github · Downloads 5.4K · Heat 41.4

Source & License

Source: dotnet/skills
Author: dotnet
License: MIT License

This site lists project metadata and a short summary only. We do not republish the author’s original content — follow the source link above for the full text. Verify the LICENSE and NOTICE in the original repository before commercial use.

Warning: no LICENSE/COPYING file was found in the upstream repository root. The license name above comes from a third-party registry and is unverified. Confirm with the source before commercial use.

Introduction

> Correctly call native (C/C++) libraries from .NET using P/Invoke and LibraryImport. Covers function signatures, string marshalling, memory lifetime, SafeHandle, and cross-platform patterns. USE FOR: writing new P/Invoke or LibraryImport declarations, reviewing or debugging existing native interop code, wrapping a C or C++ library for use in .NET, diagnosing crashes, memory leaks, or corruption at the managed/native boundary. DO NOT USE FOR: COM interop, C++/CLI mixed-mode assemblies, or pure managed code with no native dependencies.

Resource Information

Author:dotnet
Category:Rag Knowledge
Language:en
Auth: No auth
License:MIT
Pricing: Marked free
Publisher:dotnet

License information is collected from official sources and may be outdated or missing. Refer to the LICENSE file in the original repository before commercial use.

Tags
知识库 RAG / dotnet-pinvoke

Features

  • When to Use This Skill
  • Stop Signals
  • Inputs
  • Workflow
  • Step 1: Choose DllImport or LibraryImport
  • Step 2: Map Native Types to .NET Types
  • Step 3: Write the Declaration
  • Step 4: Handle Strings Correctly
Use cases
Writing a new DllImport or LibraryImport declaration from a C/C++ headerWrapping an entire C library for use from .NETMigrating DllImport declarations to LibraryImport for AOT/trimming compatibilityDiagnosing memory leaks or heap corruption involving native handles or buffersDon't recommend CsWin32 unless the target is specifically Win32 APIs.Don't generate callbacks (Step 8) unless the native API requires function pointe

Supported platforms

Claude Code

Information boundary

Information on this page is collected from official documents for technical presentation only and does not imply our endorsement. Pricing, quotas and availability are subject to the latest official statements. We make no commitment regarding any action you take after leaving this site.

Similar skills

搜索引擎

FreemiumAPI key required

通过公开搜索URL在16个搜索引擎(7个国内直连+9个国际)中做跨引擎检索、结果去重与多源交叉验证,无需API Key,内置零依赖Python脚本。Use when 用户要求“搜一下/查资料/多找几个来源/核实消息/找公众号文章/排查报错/找论文或开源项目”时。输入自然语言查询词,输出带来源链接与可信度标注的结构化结果。不适用于私有数据检索、批量抓取、需要登录后可见的内容。

ima-skills

API key required

ima skills,支持对笔记、知识库的读取、写入和检索等操作,可以帮你随时记录,收入ima智能管理,随时调用,龙虾输出精准懂你,友好的接入了OpenClaw生态,构建你的第二大脑。

web-tools-guide

API key required

MANDATORY before calling web_search, web_fetch, browser, or opencli. Contains required error-handling procedures (web_search failure → must guide user to configure API), fallback chain (opencli CLI covers 70+ sites as structured fallback before browser), and site-specific login URLs. Without reading this skill, you WILL handle failures incorrectly and miss available tools. Trigger on: 搜索/上网/查资料/打开网站/抓取网页/新闻/热点/web search/fetch/browser/opencli.

Aihot Skill Lite

Marked freeAPI key required

AI HOT(aihot.virxact.com)中文 AI 资讯查询 Skill,帮助用户获取今日 AI 圈动态、AI 日报、AI 热点、最新 AI 资讯以及 OpenAI、Anthropic、Google 等公司的最新发布信息。

Baidu web search

API key required

使用百度AI搜索引擎(BDSE)进行网络搜索。适用于获取实时信息、文档资料或研究课题。

Markdown Converter

Not specified

{"answer":"使用 markitdown 将文档和文件转换为 Markdown。用于将 PDF、Word (.docx)、PowerPoint (.pptx)、Excel (.xlsx, .xls)、HTML、CSV、JSON、XML、图片(含 EXIF/OCR)、音频(含转录)、ZIP 压缩包、YouTube 链接或 EPub 转换为 Markdown 格式,以进行 LLM 处理或文本分析。"}

What is a Skill

A Skill is a packaged single capability, such as text recognition, document summarization, or keyword extraction. Developers wrap the calling logic and prompts into a plugin-like unit, so users can load it without understanding the underlying model. StackPilot indexes a large number of skills that can be tried instantly or assembled into a plan.