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.

Capture screen on server desktop session

I have developed a GUI test framework that does integrationtesting of our company website on a scheduled basis. When something …

c# .net windows-server-2008 pinvoke system.drawing
C# not catching unhandled exceptions from unmanaged C++ dll

I've got an unmanaged C++ dll which is being called from a C# app, I'm trying to get the C# …

c# c++ dll exception-handling pinvoke
Why can't I return a char* string from C++ to C# in a Release build?

I'm attempting to call the following trivial C function from C#: SIMPLEDLL_API const char* ReturnString() { return "Returning a static …

.net pinvoke marshalling access-violation
Need to activate a window

I have a situation like this. I have the window handle of an application. I need to activate it. I …

c# winforms pinvoke dllimport user32
Passing a C# callback function through Interop/pinvoke

I am writing a C# application which uses Interop services to access functions in a native C++ DLL. I am …

c# function interop callback pinvoke
why IntPtr.size is 4 on Windows x64?

I think I should get 8 when I use IntPtr.Size. However I still get 4 on x64 machine with Widnows 7 x64, …

c# pinvoke
Can I use SafeHandle instead of IntPtr?

I've searched the internet far and wide but didn't find a good explanation. My question is pretty simple. I have …

c# pinvoke marshalling handle
Is there any way to debug c++ dll called from C# DllImport?

I wonder if there is any way to debug c++ dll called from C# PInvoke in VS 2010. I tried to …

c# c++ pinvoke
How to return text from Native (C++) code

I am using Pinvoke for Interoperability between Native(C++) code and Managed(C#) code. What i want to achieve is …

c# c++ string pinvoke
Implementing a Win32 message loop and creating a Window object with P/Invoke

My main goal is to implement a proper message loop purely with P/Invoke calls that is able to handle …

c# .net silverlight pinvoke message-loop