Top "Dllimport" questions

Use this tag for questions about importing functions, data or objects from DLLs (Dynamic-link libraries).

DllImport vs LoadLibrary, What is the best way?

i'm usually using Win32 API in c#.NET. But not declare all in one application. Sometimes usually using user32, sometimes …

c# winapi dllimport loadlibrary
Generate C# DLLImport declarations from a native dll

Do you know a soft which automatically generates C# code (with [DllImport] attributes in .cs) from a native DLL in …

c# dll native dllimport
Why/when is __declspec( dllimport ) not needed?

In a project using a server.dll and a client.exe, I have dllexported a server symbol from the server …

c++ dllimport visual-c++-2005 declspec
How can I import dll of a C++ class inside a namespace

I read some documents which gives simple examples on functions compatible with C. __declspec(dllexport) MyFunction(); I'm okey with that. …

c++ dll dllimport explicit linkage
How to add a C++ DLL in Windows Phone 8 (C#) Framework

I am trying to add a C++ DLL to Windows Phone 8 framework in Visual Studio Express 2012. I have tried following …

c# dll visual-studio-2012 dllimport windows-phone-8
C# DLLImport converted to VB.NET DLLImport...what am I missing?

In C# I have this: [DllImport("user32.dll", EntryPoint = "GetDesktopWindow")] public static extern IntPtr GetDesktopWindow(); I tried to convert to …

vb.net interop pinvoke dllimport c#-to-vb.net
Get the title of the active window

I have declared the following WinAPI calls <DllImport("USER32.DLL", EntryPoint:="GetActiveWindow", SetLastError:=True, CharSet:=CharSet.Unicode, ExactSpelling:=True, …

vb.net winforms winapi dllimport user32
Change C# DllImport target code depending on x64/x86

I have an external c++ dll to import using DLLImport. If my application is compiling in x64 I need to …

c# dllimport windows-7-x64
DllImport can't find dll even though dll is in same folder as executable

I'm trying to use the llvm-fs project, which provides llvm bindings for F#. I have compiled the LLVM-3.1.dll file …

.net f# llvm dllimport llvm-fs
Free unmanaged memory allocation from managed code

A .NET application calls C dll. The C code allocates memory for a char array and returns this array as …

.net memory-management unmanaged dllimport