Top "Dllimport" questions

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

How to export/import a C struct from a DLL/ to a console application using __declspec( dllexport/import )

This is my first time dealing with DLLs. Following the MSDN documentation I created a header file fooExports.h with …

c dll struct dllimport dllexport
Why use DllImport Attribute as apposed to adding a reference?

I've seen a couple of examples such as this: [DllImport("user32.dll")] static extern bool TranslateMessage([In] ref Message lpMsg); […

c# visual-studio dll reference dllimport
declspec and stdcall vs declspec only

I'm a new person to C++ dll import topic and may be my question is very easy but I can …

c# c++ dllimport stdcall
C# delegate for C++ callback

I think I have basically understood how to write c# delegates for callbacks, but this one is confusing me. The …

c# c++ delegates callback dllimport
How to import void * C API into C#?

Given this C API declaration how would it be imported to C#? int _stdcall z4ctyget(CITY_REC *, void *); I've …

c# pinvoke dllimport
How to include a .h or .dll file in CANoe/CAPL

I want integrate a header .h or .dll file in CAPL (concretly Visa32.dll, visa.h or sicl.h) to …

header-files dllimport capl canoe
__cdecl and __declspec calling conventions confusion

I am writing a DLL for a third party application. The main software engineer mentions that the application uses the __…

c++ c dllimport calling-convention
DLLimport unable to load dll

I am using an unmanaged dll in cpp which I call from from my C# web project. It works fine …

c# c++ dll interop dllimport
C# Struct No Parameterless Constructor? See what I need to accomplish

I am using a struct to pass to an unmanaged DLL as so - [StructLayout(LayoutKind.Sequential)] public struct valTable { …

c# dll constructor struct dllimport
DllImport and char*

I have a method I want to import from a DLL and it has a signature of: BOOL GetDriveLetter(OUT …

c# .net pinvoke marshalling dllimport