dll

C# - 'Resources' DLL failing to be loaded as it doesn't exist - How might I find the reference so that I can remove it?

╄→尐↘猪︶ㄣ 提交于 2020-01-01 12:10:49
问题 I have a C# Solution which spits out an executable binary on compilation. The binary depends on a library which is the product of another solution which I wrote, all code concerned I created. Recently I played around with a number of project settings in a fairly haphazard manner, trying to get a feel for how CLR building an linking works. Unfortunately (predictably?) I have managed to break the linking on my binary but I'm not sure how to fix the issue. When I my binary I get the following

C# - 'Resources' DLL failing to be loaded as it doesn't exist - How might I find the reference so that I can remove it?

痞子三分冷 提交于 2020-01-01 12:10:08
问题 I have a C# Solution which spits out an executable binary on compilation. The binary depends on a library which is the product of another solution which I wrote, all code concerned I created. Recently I played around with a number of project settings in a fairly haphazard manner, trying to get a feel for how CLR building an linking works. Unfortunately (predictably?) I have managed to break the linking on my binary but I'm not sure how to fix the issue. When I my binary I get the following

Porting (unmanaged) C++ to C# vs. using the C++ as a DLL in a C# application

老子叫甜甜 提交于 2020-01-01 10:44:52
问题 I have a code library written in plain old C++ (no .NET/managed code) and I'm porting the application that uses this code to C#. I'm faced with two options: Rewrite the C++ code in C# to achieve the same functionality; Compile the C++ as a DLL and use it as a library in the C# application. I'm relatively new to C# and am pretty unfamiliar with the implications of using an unmanaged code library in a C# app (or if there even are any). The code itself is moderate in size; it will likely take

Porting (unmanaged) C++ to C# vs. using the C++ as a DLL in a C# application

三世轮回 提交于 2020-01-01 10:44:08
问题 I have a code library written in plain old C++ (no .NET/managed code) and I'm porting the application that uses this code to C#. I'm faced with two options: Rewrite the C++ code in C# to achieve the same functionality; Compile the C++ as a DLL and use it as a library in the C# application. I'm relatively new to C# and am pretty unfamiliar with the implications of using an unmanaged code library in a C# app (or if there even are any). The code itself is moderate in size; it will likely take

I want to know what functions are available from a Win32.DLL

谁都会走 提交于 2020-01-01 10:10:51
问题 I have a DLL file that has some helpful functions I want to call in my application. Unfortunately I don't have the documentation for it any longer. Is there any way I can discover what are the functions exported by the DLL and their method signature? Maybe there's a utility that lists the functions and their arguments. Know of any? 回答1: The windows SDK used to include the dependency walker GUI utility that can be used to explore DLL content: Dependency Walker is a free utility that scans any

Visual Studio C++ dll library crashes in Qt application

冷暖自知 提交于 2020-01-01 08:53:27
问题 I have a problem sharing "std::string" data between MS Visual C++ DLL library and Qt program. What I have are: DLL library written in Visual C++ 2010 Express, which exports one method: extern "C" __declspec(dllexport) int Init(ITest* commandTest); Abstract interface "ITest" and a class implementing it: class CTest: public ITest { public: CTest(); virtual ~CTest(); virtual void getVersion(std::string & version) const; }; Qt GUI application that needs to: * load the DLL dynamically *

How to use NLog for a DLL

梦想的初衷 提交于 2020-01-01 08:02:56
问题 I am trying to implement a simple log using Nlog Refresh 1.0 for a class Library project. It seems nlog does not create a logfile when it's instantiated from within a dll. Is there some other way around this ? my config file looks like this: <nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" throwExceptions="true"> <targets> <target name="file" xsi:type="File" fileName="${basedir}/nlog.txt" /> <target name="console" xsi:type=

How can `kernel32.dll` export an ordinal of 0, when its `OrdinalBase` field is set to 1?

狂风中的少年 提交于 2020-01-01 07:22:05
问题 Looking at kernel32.dll as it is loaded into memory, I see the following export ordinal table: (gdb) x /400hd $eax 0x776334b0 <Wow64Transition+71576>: 3 4 5 6 7 8 9 10 0x776334c0 <Wow64Transition+71592>: 11 12 13 14 15 16 17 18 0x776334d0 <Wow64Transition+71608>: 19 20 21 22 23 24 25 26 0x776334e0 <Wow64Transition+71624>: 27 28 29 30 31 32 33 34 0x776334f0 <Wow64Transition+71640>: 35 36 37 38 39 40 41 42 0x77633500 <Wow64Transition+71656>: 43 44 45 46 47 48 49 50 0x77633510 <Wow64Transition

How to return a string from a C++ DLL into a MetaTrader 4 code-execution ecosystem?

浪子不回头ぞ 提交于 2020-01-01 06:39:15
问题 I have following function __declspec(dllexport) wchar_t* __stdcall __getJson(wchar_t * listN){ setlocale(LC_ALL, ""); //function logic wstring ant = utf8_to_wstring(result); const WCHAR* constRes = ant.c_str(); WCHAR* tempObj=new WCHAR[ant.length()]; wcscpy(tempObj, constRes); thread Thread([tempObj]{ Sleep(1000); delete[] tempObj; }); Thread.detach(); return tempObj; } This DLL returns wchar_t* to MetaTrader4. I tried many ways to return correct value and avoid memory leaks such as set

Catching a DLL crash in C/C++

a 夏天 提交于 2020-01-01 06:30:08
问题 I'm calling a function from a DLL, like this: __declspec ( dllimport ) bool dll_function(...); int main() { [...] if (dll_function(...)) { [...] } } In some cases, the data I pass to the DLL function will lead to a crash of the DLL. Is it possible to catch this so my application doesn't crash as well (without modifying the DLL which is not created by me)? 回答1: You can catch AVs with the __try and __except keywords in the MSVC compiler. Not all that useful, you have no idea what kind of damage