774 questions
0 votes
0 answers
54 views
How to call method of another .Net library from a function exported for native code using DllExport 1.8?
We created a .NET 8 library DllExportTest.dll in C#. This library exports two functions (AddOne and AddOneWithHelper) to be called from native code. The export is done with the DLLExport 1.8 package. ...
0 votes
1 answer
199 views
DllExport: exporting function from C# .NET8.0 Windows Forms Class Library for use in Delphi project?
We have a 32-bit application written in Delphi. We also have a Windows Forms Class Library written in C#. To export the library functions we use NuGet DllExport package. Everything works fine with ....
1 vote
1 answer
99 views
Symbols not exported when creating Windows DLL using MingW
I'm trying to debug this issue with DuckDB. For the Windows build cross-compiled on Linux using the MingW toolchain, newer versions of the DuckDB library does not export any of the C-API symbols in ...
1 vote
1 answer
79 views
Debugging a DLL with exported functions using [UnmanagedCallersOnly]
I'm using a .NET 8 DLL from which a function AddOne is exported: [UnmanagedCallersOnly(EntryPoint ="AddOne")] public static int AddOne(int x) { Console.WriteLine("Inside AddOne"...
1 vote
1 answer
200 views
Undefined class while using __declspec(dllexport) since Visual Studio 17.2
The following code compiles well for Visual Studio < 17.2: #include <optional> #include <map> class __declspec(dllexport) A { using M = std::map<int, A>; std::optional<...
-4 votes
1 answer
106 views
C++ Injection dll export function
I am trying to inject a dll in a windows .exe process for example notepad.exe, the injection works fine but when the dll is already injected in the process and I try to call the exported function it ...
0 votes
0 answers
95 views
Why Can't Data Members Be Exported To A DLL?
As far as I understand, the point of __declspec(dllexport) is to be an instruction during DLL compilation to export enough information to the LIB that goes with the DLL to allow specifically member ...
1 vote
1 answer
99 views
C++ DLL - Prevent Access To Items After Compilation?
I really don't like the idea of putting lots of effort into carefully developing & designing a C++ library only for it to be the case that the only thing stopping those who link the DLL from ...
0 votes
0 answers
64 views
Calling uwp library from unreal engine
I'm trying to use an sdk that is built for .NetCore which I got from Nuget. Since, I can't directly use it in Unreal Engine 4 (.NetFramework), I've made a UWP C# Class library as a wrapper, and I'm ...
1 vote
1 answer
149 views
Adding a C++ DLL as a reference to C# works on x86 but fails on x64
Using Microsoft Visual Studio Professional 2019: Created a simple addition function in C++ to generate a DLL file. In a new C# project, referenced the above DLL file. Win32: For both the C++ DLL and ...
0 votes
0 answers
617 views
Creating a DLL in CLion
I have a program for a game AI for a 3D Connect 4 game (4x4x4) in C++. I made the same game in Unity 3D. I want to interface the game AI in C++ with my Unity project by creating a DLL that will accept ...
-1 votes
1 answer
75 views
Passing HWND from Delphi 7 to C++ DLL
I have a Delphi 7 application that tries to render an OpenGL scene into a TPanel by passing the property Handle of the TPanel to a C++ DLL (written in Visual Studio 2008). Here's the DLL function ...
1 vote
2 answers
127 views
Using VS C++ functions in Inno Setup
I'm trying to replace some functions made in LazarusLib with functions written in C++ for Inno Setup installer. So I created a Dynamic-Link Library (DLL) project in Visual studio and added the ...
1 vote
1 answer
145 views
What's the bug in this code, or what's the bug in MSVC? [duplicate]
Here's the snippet of code #include<memory> #include<unordered_map> struct __declspec(dllexport) Foo { std::unordered_map<const int*, std::unique_ptr<int>> foo; }; Foo ...
0 votes
1 answer
309 views
Errors with '__declspec' in C++ 20
Alright. Let me describe my issue. So, have this macro: #ifdef DLL_MODE #define DLL_API __declspec(dllexport) #else #define DLL_API __declspec(dllimport) #endif And this class: class DLL_API Test { ...