System::Runtime::InteropServices
Chapter 22/23 of the ‘Pro Visual C++/CLI and the .NET 3.5 Platform’ book is an excellent resource for understanding P/Invoke (and an excellent VC++ book generally).
System::Runtime::InteropServices
Chapter 22/23 of the ‘Pro Visual C++/CLI and the .NET 3.5 Platform’ book is an excellent resource for understanding P/Invoke (and an excellent VC++ book generally).
You need to use the /clr compile option. /clr:safe will generate all sorts of errors.
You can’t call managed code from the unmanaged code. (more…)