Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
How to call c# from c++ - meetup app osaka@10
Search
Akiko Kawai
February 21, 2026
Programming
69
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
180
C# and C++ Interoperability - cho-dotnetnew
harukasao
0
680
VCpp Link and Library - C++ breaktime 2025 Summer
harukasao
0
340
Coding Experience Cpp vs Csharp - meetup app osaka@9
harukasao
0
1.3k
Selected MAUI Blazor - meetup app osaka@8
harukasao
0
190
Try C++ module! - meetup app osaka@5
harukasao
0
540
シミュレーター制作の感想/ Tried developing Simulator at .NET Lab 201910
harukasao
0
130
NimTorchの紹介 / Introduce NimTorch meetup app osaka @3
harukasao
0
940
std::optionalの使い方 / how to use optional nakamecpp_13
harukasao
0
2.7k
Other Decks in Programming
See All in Programming
sbt 2.0: takeoff
eed3si9n
0
190
Crash Auto Pipelines
veronikapj
1
340
TanStack Vue Query と Pinia Colada から学ぶ非同期状態の型設計
aoshi
0
600
作って学ぶSpring BootのAuto Configuration / JJUG Night Seminar 2026-10-19
rshindo
0
220
baseline으로 마이그레이션, 리팩토링 안전하게 맡기기
fornewid
1
870
Getting Started with Vibe Coding
miccheng
0
180
AIがコードを書いてくれる時代、我々は何を確かめるのか
yosuke_furukawa
PRO
13
5.6k
React Native経験者が Flutterを30⽇間触って驚いたこと
3saito
0
140
Groovy as a human and AI friendly programming language
paulk
0
170
クラウドゲーミングのパフォーマンス最適化に挑む / Cloud Gaming Performance Tuning
vivion
0
320
コーディング自動化の次へ。人の介入をゼロにするファクトリーとサポートAIによる実践
timakin
5
5.1k
Enforcing Your Architecture with Unit Tests in the AI Era (Swift Connection X)
steliosf
PRO
1
120
Featured
See All Featured
Making the Leap to Tech Lead
cromwellryan
135
10k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.7k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
620
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
350
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
370
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.4k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
600
Tell your own story through comics
letsgokoyo
1
1.1k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.6k
brightonSEO & MeasureFest 2025 - Winning Strategies for Black Friday CRO & PPC - Christian Goodrich
cargoodrich
3
890
Optimising Largest Contentful Paint
csswizardry
37
4k
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]
ありがとうございました