PInvoke - Interoperability between C++ and C#
Because of a C# training I had to do recently, I took my existing PInvoke material and brought it up to date. Here are the slides and samples. The material covers the following topics:
- C++ basics (e.g. how to debug C++ and C# in a single project?)
- Interop basics (DllImport, simple data types, Marshal class, character sets, etc.)
- Manual marshaling (IntPtr, C# unsafe code, fixed buffers, etc.)
- Advanced marshaling topics (e.g. arrays, callbacks, manual memory management, etc.)
The samples have also been refreshed and I have put them into my GitHub repo.
You can view the slides here. If you prefer having them as PDF, you can download them here.