dll

Assemble .NET dll in Node.js using edge

假如想象 提交于 2021-02-10 05:11:25
问题 I am not very familiar with dll or .NET. I am trying to run dll libraries using node. I am using edge.js. Essentially, I have a directory bin/Debug with several dll files. I'm looping through the files and trying to assemble each of them o that i can run some methods from the dll. const edge = require('edge-js') const dllPath = './somePath/bin/Debug/' const fs = require('fs') const path = require('path') let obj = {} fs.readdir(dllPath, [], (err, files) => { files.forEach((file) => { if(file

Assemble .NET dll in Node.js using edge

蹲街弑〆低调 提交于 2021-02-10 05:11:08
问题 I am not very familiar with dll or .NET. I am trying to run dll libraries using node. I am using edge.js. Essentially, I have a directory bin/Debug with several dll files. I'm looping through the files and trying to assemble each of them o that i can run some methods from the dll. const edge = require('edge-js') const dllPath = './somePath/bin/Debug/' const fs = require('fs') const path = require('path') let obj = {} fs.readdir(dllPath, [], (err, files) => { files.forEach((file) => { if(file

DLL export and inheritance in C++

删除回忆录丶 提交于 2021-02-08 15:27:19
问题 I'm trying to export a class and its base class from a DLL like this: #ifdef MY_EXPORTS #define DECLSPEC_TEST __declspec(dllexport) #else #define DECLSPEC_TEST __declspec(dllimport) #endif class DECLSPEC_TEST BaseClass { // stuff. }; class DECLSPEC_TEST DerivedClass : public BaseClass { // This class only has a constructor which initializes the class differently. }; But I try to use this class in another DLL, I keep getting an error: error LNK2019: unresolved external symbol "__declspec

C++ Load DLL From a Subdirectory?

核能气质少年 提交于 2021-02-08 13:44:38
问题 I'm new to the "hidden/dark places" of C++ and I was wondering how to load a .dll file from a different directory or a sub-directory inside the one where my current executable is running Ex: ./MyAppDirectory /MyApp.exe /SomeDLL.dll /AnotherDLL.dll /SubDirectory /SomeDLL2.dll /AnotherDLL2.dll /YetAnotherDLL.dll /... So "MyApp.exe" automatically loads "SomeDLL.dll" and "AnotherDLL.dll" from it's root folder "MyAppDirectory" however I also want to be able to load "SomeDLL2.dll", "AnotherDLL2.dll

How to stop DLL Hijacking for secondary IMPLICITLY loaded DLLs

◇◆丶佛笑我妖孽 提交于 2021-02-08 11:46:42
问题 For example, COMDLG32.DLL implicitly links against the following system DLLs (among others): xmllite.dll msftedit.dll srvcli.dll wkscli.dll linkinfo.dll netutils.dll msi.dll Since these are implicitly loaded by the operating system, not explicitly loaded using LoadLibrary call, the hijack vulnerability workaround using SetDllDirectory does not affect these loads being done when COMDLG32.DLL is loaded. Hence, after my application is loaded, and I hit Ctrl+O to use the File Open dialog, these

External symbol resolving in a dll

淺唱寂寞╮ 提交于 2021-02-08 08:51:06
问题 I'm working on a cross-platform c++/qt project with a plugin system, we are using so files on linux and dll on windows. We are using gcc on Linux and Visual Studio 2010 on Windows through cmake. The problem is our plugins sometimes need to call a function from the application source code, which is working fine on Linux with gcc by just including the header files. But on Visual Studio, we got unresolved external symbol errors. Is it because so and dll files works differently? thank you. 回答1:

How to bind c++ dll to my C# program - winCE

落爺英雄遲暮 提交于 2021-02-08 06:50:00
问题 i need to bind C++ dll to my C# WinCE program. (scanner dll) how i can do it ? thank's in advance 回答1: You need to use Interop to call into unmanaged code. using System.Runtime.InteropServices; // DllImport public class Win32 { [DllImport("User32.Dll")] public static extern void SetWindowText(int h, String s); } Here is an article that discusses the topic in detail (also where the code is sourced from). http://msdn.microsoft.com/en-us/magazine/cc301501.aspx 回答2: An alternative to InterOp is

How to bind c++ dll to my C# program - winCE

不羁的心 提交于 2021-02-08 06:48:49
问题 i need to bind C++ dll to my C# WinCE program. (scanner dll) how i can do it ? thank's in advance 回答1: You need to use Interop to call into unmanaged code. using System.Runtime.InteropServices; // DllImport public class Win32 { [DllImport("User32.Dll")] public static extern void SetWindowText(int h, String s); } Here is an article that discusses the topic in detail (also where the code is sourced from). http://msdn.microsoft.com/en-us/magazine/cc301501.aspx 回答2: An alternative to InterOp is

How to find out API functions of DLL files?

坚强是说给别人听的谎言 提交于 2021-02-08 06:45:28
问题 Is there a way to get all the API (Export) functions from a DLL file ? I know that programs such as Depend s and PE Explorer can do that but none of them retrieve the argument list. 回答1: Unless the exported functions are something like a COM DLL or C++ with munging, the information simply isn't there to provide the arguments. It's normally possible to find the total size of the arguments, and there's a pretty decent chance that dividing by 4 will give something close to the right number, but

Trying to use win32ui with pywin32 gives: A dynamic link library (DLL) initialization routine failed

自作多情 提交于 2021-02-08 06:39:55
问题 I am trying to use the win32ui module from pywin32 (yes i have the correct version). My win32gui module does work fine but the ui module give me and error. I have already tried: reinstalling python, adding PYTHON_PATH too system vars, running the after install pywin32 script, For the rest I am kinda of out thing i can try to do. Python version: 3.9 (64 bit) Pywin32 version: pywin32-228.win-amd64-py3.9 (is the .exe file name i don't know how to find the version) just to clear up my only code