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
40
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
50
C# and C++ Interoperability - cho-dotnetnew
harukasao
0
150
VCpp Link and Library - C++ breaktime 2025 Summer
harukasao
0
320
Coding Experience Cpp vs Csharp - meetup app osaka@9
harukasao
0
1.2k
Selected MAUI Blazor - meetup app osaka@8
harukasao
0
170
Try C++ module! - meetup app osaka@5
harukasao
0
500
シミュレーター制作の感想/ Tried developing Simulator at .NET Lab 201910
harukasao
0
110
NimTorchの紹介 / Introduce NimTorch meetup app osaka @3
harukasao
0
910
std::optionalの使い方 / how to use optional nakamecpp_13
harukasao
0
2.7k
Other Decks in Programming
See All in Programming
Performance Engineering for Everyone
elenatanasoiu
0
160
TSKaigi Night Talks 2026_TypeScriptでサプライチェーンの整合性を型に閉じ込める
geekplus_tech
0
390
CSC307 Lecture 17
javiergs
PRO
0
320
Signal Forms: Details & Live Coding @enterJS 2026 in Mannheim
manfredsteyer
PRO
0
150
New "Type" system on PicoRuby
pocke
1
960
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
580
Strategic Design in the Frontend: Moduliths & Micro Frontends @DDDEurope
manfredsteyer
PRO
0
110
ローカルLLMでどこまでコードが書けるか -拡張版 / How much code can be written on a local LLM Extended
kishida
11
4.2k
Even G2とAWSで推しのエージェントを召喚しよう!
har1101
1
120
Observability in Practice:Grafana 與 Edge Device SRE 的那些事
blueswen
0
170
Spring Security 実践 ─ GraphQL APIで実務に役立つ 認証・認可 を学ぶ
wagyu
0
240
生成AI時代にこそ効くGo | Why Go Works in the Age of Generative AI
mom0tomo
8
3.3k
Featured
See All Featured
Large-scale JavaScript Application Architecture
addyosmani
515
110k
The Curse of the Amulet
leimatthew05
1
13k
The Limits of Empathy - UXLibs8
cassininazir
1
360
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Crafting Experiences
bethany
1
180
Building Flexible Design Systems
yeseniaperezcruz
330
40k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
850
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
200
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
200
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
590
The untapped power of vector embeddings
frankvandijk
2
1.8k
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]
ありがとうございました