Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/corytodd/interop-example
C# CLR Win32 Interop Example
https://github.com/corytodd/interop-example
Last synced: 2 days ago
JSON representation
C# CLR Win32 Interop Example
- Host: GitHub
- URL: https://github.com/corytodd/interop-example
- Owner: corytodd
- License: mit
- Created: 2015-04-11T22:51:38.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-04-11T23:33:30.000Z (over 9 years ago)
- Last Synced: 2024-04-16T12:53:25.429Z (7 months ago)
- Language: C#
- Size: 246 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Interop Example
C# CLR Win32 Interop Example ProjectThis example was written in Visual Studio 2013 using C# .NET 4.5 , C++/CLR, and Win32 C++. The purpose of this project is to demonstrate how to use CLR wrappers to utilize native Win32 libraries from within C#.
For simplicity, the MathFunc dll is taken from the [official Microsoft dll walkthrough](https://msdn.microsoft.com/en-us/library/ms235636.aspx).
The CLR wrapper and C# code was developed by me to learn and share how to achieve interoperation between native libraries and C# .NET without the use of P/invoke.
### Important Note:
The C# executable requires the MathFuncDll to be in working directory. A post-build event was added to automatically copy the dll into the output directory to avoid the FileNotFound issue.