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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Akiko Kawai
February 21, 2026
Programming
0
24
How to call c# from c++ - meetup app osaka@10
2026/2/21 meetup app osaka@10
「C++からC#を呼ぶ方法の一覧」遥佐保
Akiko Kawai
February 21, 2026
Tweet
Share
More Decks by Akiko Kawai
See All by Akiko Kawai
VCpp Link and Library - C++ breaktime 2025 Summer
harukasao
0
290
Coding Experience Cpp vs Csharp - meetup app osaka@9
harukasao
0
1.1k
Selected MAUI Blazor - meetup app osaka@8
harukasao
0
160
Try C++ module! - meetup app osaka@5
harukasao
0
490
シミュレーター制作の感想/ Tried developing Simulator at .NET Lab 201910
harukasao
0
100
NimTorchの紹介 / Introduce NimTorch meetup app osaka @3
harukasao
0
890
std::optionalの使い方 / how to use optional nakamecpp_13
harukasao
0
2.6k
2017/11/12 Optimized C++!
harukasao
0
230
2016/8/9 YEBIS for Unity (beta)のご紹介/Iwate Game Factory 2016 Summer Event
harukasao
0
11k
Other Decks in Programming
See All in Programming
API Platformを活用したPHPによる本格的なWeb API開発 / api-platform-book-intro
ttskch
1
130
クライアントワークでSREをするということ。あるいは事業会社におけるSREと同じこと・違うこと
nnaka2992
1
330
AIに任せる範囲を安全に広げるためにやっていること
fukucheee
0
130
encoding/json/v2のUnmarshalはこう変わった:内部実装で見る設計改善
kurakura0916
0
400
Fundamentals of Software Engineering In the Age of AI
therealdanvega
1
250
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
180
15年目のiOSアプリを1から作り直す技術
teakun
1
620
ふつうのRubyist、ちいさなデバイス、大きな一年 / Ordinary Rubyists, Tiny Devices, Big Year
chobishiba
1
430
Unity6.3 AudioUpdate
cova8bitdots
0
120
オブザーバビリティ駆動開発って実際どうなの?
yohfee
3
820
Claude Code Skill入門
mayahoney
0
230
野球解説AI Agentを開発してみた - 2026/02/27 LayerX社内LT会資料
shinyorke
PRO
0
120
Featured
See All Featured
How Software Deployment tools have changed in the past 20 years
geshan
0
32k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
130
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
140
My Coaching Mixtape
mlcsv
0
69
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4k
How to train your dragon (web standard)
notwaldorf
97
6.6k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
390
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
150
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
290
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
150
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]
ありがとうございました