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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Akiko Kawai
February 21, 2026
Programming
56
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
95
C# and C++ Interoperability - cho-dotnetnew
harukasao
0
580
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
自動化したのに回らないテスト運用の壁ーAI時代の品質責任と生産性
mfunaki
0
130
Lean は証明の正しさを確認するためだけのツールって思ってませんか?
inoueasei
1
160
AWS CDK を「作」ってみた 〜フルスクラッチで見えた CDK の裏側〜 / aws-cdk-from-scratch
gotok365
3
2.8k
源内ハンズオン概要編
hideg
0
170
そこに3びきプロダクトがいるじゃろう——生成AI時代における“価値が届かない理由”の構造
kosuket
0
470
170k Jobs a Day on GKE: Scaling Mercari's CI Platform - and What's Next for AI-Native Development
junyaokabe
0
110
Android CLI
fornewid
0
220
Go言語とトイモデルで学ぶTransformerの気持ち / fukuokago23-transformer
monochromegane
0
170
Claude Code全社展開のためにやったことn選~プラグイン302個・コミッター271人を支えるために~
kenchan
5
1.5k
torikago - Ruby::Boxで照らすモジュラモノリスの実行境界
se4weed
1
370
AIが無かった頃の素敵な出会いの話
codmoninc
1
420
変わらないものが、変わるものを決める — 意図駆動開発 × イベントソーシング × イミュータブル | What Doesn't Change Decides What Can — IDD × Event Sourcing × Immutability
tomohisa
0
1.6k
Featured
See All Featured
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.9k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
67k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
640
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.5k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.4k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
230
It's Worth the Effort
3n
188
29k
We Have a Design System, Now What?
morganepeng
55
8.3k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
470
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.5k
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]
ありがとうございました