Top "Pinvoke" questions

P/Invoke is an implementation specification created by Microsoft of the Common Language Infrastructure (CLI) for invocation of native code libraries from managed code.

Can't find PInvoke DLL error in Windows Mobile

I am having a lot of trouble getting a basic scenario to work on windows mobile 5.0 emulator. I have a …

.net windows-mobile compact-framework pinvoke emulation
Marshal "char *" in C#

Given the following C function in a DLL: char * GetDir(char* path ); How would you P/Invoke this function into …

.net pinvoke marshalling
Getting the Windows System Error Code title/description from its hex number

I'm messing around with some windows functions using p/invoke. Occasionally, I get an error code that is not ERROR_…

c# .net windows pinvoke
How can I pass a pointer to an array using p/invoke in C#?

Example C API signature: void Func(unsigned char* bytes); In C, when I want to pass a pointer to an …

c# c api pinvoke
C# performance - Using unsafe pointers instead of IntPtr and Marshal

Question I'm porting a C application into C#. The C app calls lots of functions from a 3rd-party DLL, so …

c# c pinvoke marshalling unsafe
DllNotFoundException with HRESULT 0x8007007E when loading 64-bit dll

I downloaded zlib and compiled the library as both Windows 32-bit and Windows 64-bit dll. I now have zlibwapi.dll …

c# visual-studio-2008 pinvoke dllimport dllnotfoundexception
Unable to find an entry point when calling C++ dll in C#

I am trying to learn P/Invoke, so I created a simple dll in C++ KingFucs.h: namespace KingFuncs { class …

c# c++ pinvoke
Calling C DLL from C#

I am trying to call a C DLL from C#, but I'm not having any joy. The documentation for the …

c# c dll pinvoke dllimport
Attach form window to another window in C#

I want to attach a form to another window (of another process). I try to do this by using [DllImport("…

c# winforms pinvoke
Global hotkey in console application

Does anyone know how to use the RegisterHotKey/UnregisterHotKey API calls in a console application? I assume that setting up/…

c# winapi pinvoke console-application