Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
How to call c# from c++ - meetup app osaka@10
Search
Akiko Kawai
February 21, 2026
Programming
47
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
How to call c# from c++ - meetup app osaka@10
2026/2/21 meetup app osaka@10
「C++からC#を呼ぶ方法の一覧」遥佐保
Akiko Kawai
February 21, 2026
More Decks by Akiko Kawai
See All by Akiko Kawai
Unity Scripting Backend - C++breaktime 2026 Summer
harukasao
0
79
C# and C++ Interoperability - cho-dotnetnew
harukasao
0
550
VCpp Link and Library - C++ breaktime 2025 Summer
harukasao
0
330
Coding Experience Cpp vs Csharp - meetup app osaka@9
harukasao
0
1.3k
Selected MAUI Blazor - meetup app osaka@8
harukasao
0
170
Try C++ module! - meetup app osaka@5
harukasao
0
510
シミュレーター制作の感想/ Tried developing Simulator at .NET Lab 201910
harukasao
0
120
NimTorchの紹介 / Introduce NimTorch meetup app osaka @3
harukasao
0
920
std::optionalの使い方 / how to use optional nakamecpp_13
harukasao
0
2.7k
Other Decks in Programming
See All in Programming
関数型プログラミングのメリットって何だろう?
wanko_it
0
190
Laravelで学ぶ Webアプリケーションチューニング入門/web_application_tuning_101
hanhan1978
4
1.2k
AIキャラアプリkaiwaの低遅延音声通話基盤をどう作ったか - AWS Gravitonで支える低遅延・低コストAI Agent基盤
mogamit
0
180
えっ!!コードを読まずに開発を!?
hananouchi
0
230
AWS CDK を「作」ってみた 〜フルスクラッチで見えた CDK の裏側〜 / aws-cdk-from-scratch
gotok365
3
500
ITヒヤリハットを整理してみた ~ライフサイクルと原因から考える再発防止策~
koukimiura
1
110
AI駆動開発を妨げる技術的負債の解消アプローチ / ai-refactoring-approach
minodriven
17
9.3k
言語を使う側から、作る側へ。 自作 Lisp で得た新たな気づき。
andpad
0
130
AI時代の仕事技芸論〜ソフトウェア開発で「遊ぶように働く」職人的熟達のすすめ(スクフェス仙台 2026バージョン)
kuranuki
0
690
地域 SRE コミュニティ最前線 - ホンマでっかSRE勉強会
tk3fftk
0
270
AI がコードを書く時代における新卒エンジニアの仕事風景 (2026) / New Graduate Engineers in the Era of AI Coding (2026)
sushichan044
0
230
SREは、MCPとSRE Agentをこう使え!
kazumax55
0
150
Featured
See All Featured
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
810
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
390
Evolving SEO for Evolving Search Engines
ryanjones
0
240
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
320
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
420
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
450
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
190
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.5k
Claude Code のすすめ
schroneko
67
230k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
370
Ruling the World: When Life Gets Gamed
codingconduct
0
290
Transcript
None
None
None
Type C# → C++(序章) C++ → C#(本丸) COM系 COM Interop(RCW)
COM Interop(CCW) CLI系 C++/CRIラッパー /clr, C++/CLIブリッジDLL Export系 P/Invoke (DLLImport,LibraryImport) DllExport, NativeAOT+[UnmanagedCallersOnly] Hosting系 なし (C++は既にNativeなので Runtime不要) CLR Hosting, hostfxr+[UnmanagedCallersOnly]
None
Type C# → C++(序章) COM系 COM Interop(RCW) CLI系 C++/CLIラッパー Export系
P/Invoke (DLLImport,LibraryImport) https://learn.microsoft.com/ja-jp/dotnet/standard/native-interop/runtime-callable-wrapper RCW C# Client COM Object C++/CLI 自作Wrapper (/clr) C# Client Native Class/DLL C# Client Marshal (auto- generated) Native DLL CRLに組み込まれている DllImport 実行時 LibraryImportビルド時
None
え?なんで? さっきの逆でしょ? C#のメモリ先に飛ん でけばいいやん? 色んなパターンがあり複雑
None
Type C++ → C#(本丸) COM系 COM Interop(CCW) CLI系 /clr 化
C++/CLIブリッジDLL CCW C# Object COM Client Native Class/DLLのCLR化 (/clr) IJW(It Just Works) Thunk using VTableFixup C++/CLI 自作ブリッジ DLL C# Object Native Class/DLL C# Object
Type C++ → C#(本丸) Export系 DllExport (~.NET Framework) NativeAOT (.NET
7+) +[UnmanagedCallersOnly] Build後にToolでC# DLLのILを書き換え パッチDLL(純粋なIL) C# Object using VTableFixup Native Class/DLL AOTコンパイラが C#コードをNativeDLLへ Native Class/DLL C# Native
Type C++ → C#(本丸) Hosting系 CLR Hosting hostfxr (.NET Core
3.0+) +[UnmanagedCallersOnly] C++ Process CLR Runtime C# Managed Heap Native Class/DLL C++ Process Core CLR Runtime C# Managed Heap Native Class/DLL
まとめ
Type C# → C++(序章) C++ → C#(本丸) COM系 COM Interop(RCW)
COM Interop(CCW) CLI系 C++/CRIラッパー /clr, C++/CLIブリッジDLL Export系 P/Invoke (DLLImport,LibraryImport) DllExport, NativeAOT+[UnmanagedCallersOnly] Hosting系 なし (C++は既にNativeなので Runtime不要) CLR Hosting, hostfxr+[UnmanagedCallersOnly]
ありがとうございました