dll

c# - How can I programmatically check that a reference is configured correctly in a solution

丶灬走出姿态 提交于 2020-01-15 03:41:08
问题 We are having some build errors and we need to manually fix the references. I would like to programmatically check that project references are defined instead of dll references: Thus go over all the references in a solution and for each project, check that the references are defined correctly. This way the relevant dependencies will be configured correctly. Does anybody know of an existing solution? I would like a validation tool that will run before the gated check-in. 回答1: I have written

VBA call same C++ dll return different results

笑着哭i 提交于 2020-01-15 02:39:05
问题 I have a test dll function that reads a string and display it: int _stdcall test(LPSTR myString) { MessageBoxA(NULL, (LPCSTR)myString, "test", MB_OK); return 0;} The excel VBA declaration is Declare Function test Lib "test.dll" (ByVal text As String) As Long There is a sub that calls the function. It reads an excel cell with value as "abcde" and is able to display a correct result. The sub code is: sub testCode() test (cells(1,1).value) end sub However when call the dll function using excel

typeid result across different dll's

谁说我不能喝 提交于 2020-01-14 19:34:13
问题 I have two dlls which both declare a templated type, let's call A. If the declaration of A is sufficiently intricate, it happens that the result of typeid(A).name() is different when called in functions in two different dll's. example: DLL1: struct MyType: public A< TEMPLATE_LIST_OF_A >{} void f(){ std::string name1 = typeid(A).name(); } DLL2: struct MyType: public A< TEMPLATE_LIST_OF_A >{} void f(){ std::string name2 = typeid(A).name(); } for example name1 could be something like: "???MyType

Passing binary data from Qt/C++ DLL into Delphi host application

橙三吉。 提交于 2020-01-14 14:08:26
问题 In a Program I want to uses QImage.bits() in Delphi. So, in Qt I was created a dll. the dll Source Code Listed in below: test.h: #ifndef TEST_H #define TEST_H #include "test_global.h" extern "C"{ TESTSHARED_EXPORT uchar* testFunc(); } #endif // TEST_H test.cpp: #include "test.h" #include <QtGui> QImage image; uchar* testFunc(){ image.load("c:\\1.png","PNG"); return (uchar*)image.constBits(); } and in the Delphi Side I use this code for using Qt dll: function testFunc(): PByteArray; external

Passing binary data from Qt/C++ DLL into Delphi host application

╄→尐↘猪︶ㄣ 提交于 2020-01-14 14:08:13
问题 In a Program I want to uses QImage.bits() in Delphi. So, in Qt I was created a dll. the dll Source Code Listed in below: test.h: #ifndef TEST_H #define TEST_H #include "test_global.h" extern "C"{ TESTSHARED_EXPORT uchar* testFunc(); } #endif // TEST_H test.cpp: #include "test.h" #include <QtGui> QImage image; uchar* testFunc(){ image.load("c:\\1.png","PNG"); return (uchar*)image.constBits(); } and in the Delphi Side I use this code for using Qt dll: function testFunc(): PByteArray; external

Cannot Update WPF GUI While Using Unmanaged Libraries In Background

自作多情 提交于 2020-01-14 14:07:24
问题 I've enocountered a problem while trying to use Emgu to capture images from a webcam. To do this task, Emgu uses unmanaged opencv libraries. So the problem is that I can't update my GUI (WPF Image control) from System.Timers.Timer Elapsed event. I know it's running in different thread, but hey, that's why I'm using a Dispatcher. It's the first time I can't do it with Dispatcher. Getting InvalidOperationException with "The calling thread cannot access this object because a different thread

Embedding prolog engine in a dll

对着背影说爱祢 提交于 2020-01-14 13:57:29
问题 I've been working on a C++ application that embeds a prolog reasoning engine lately and, as stated in the title, I am now trying to generate a DLL instead of an executable so I can use it in another project. Since I am new to DLL development, I thought I could start with a small example. I have 3 files: likes.pl : sample prolog file defining the predicate likes/2 likes.cpp : defining the function get_food() that calls PlQuery and return the results in a std::string food.cpp : using the DLL to

How do I call functions inside C++ DLL from Lua?

浪子不回头ぞ 提交于 2020-01-14 12:34:00
问题 I have a DLL written in C++ that is legacy code and cannot modify the source code. I want to be able to call some of the functions inside of the DLL from Lua. For example, I'd like to do something like this: -- My Lua File include(myCppDll.dll) function callCppFunctionFromDll() local result = myCppFunctionFromDll(arg1, arg2) --Do something with result here end Is something like this possible? 回答1: If Alien doesn't meet your needs, and it might not be easy to use if the DLL has a strongly

How do I call functions inside C++ DLL from Lua?

我们两清 提交于 2020-01-14 12:33:11
问题 I have a DLL written in C++ that is legacy code and cannot modify the source code. I want to be able to call some of the functions inside of the DLL from Lua. For example, I'd like to do something like this: -- My Lua File include(myCppDll.dll) function callCppFunctionFromDll() local result = myCppFunctionFromDll(arg1, arg2) --Do something with result here end Is something like this possible? 回答1: If Alien doesn't meet your needs, and it might not be easy to use if the DLL has a strongly

DLL issues and Invalid Memory Access

老子叫甜甜 提交于 2020-01-14 10:34:10
问题 So here is my situation. I am tasked with porting over part of a program from pascal written in a delphi IDE, at least I believe, to a Java program. I was not present at the creation of the program being ported over so I have almost no knowledge of the inner workings other than watching what it does as a final product. None-the-less, I have started transferring it over and hit a roadblock with their .dll calls. Their .dll calls are represented here: unit impdll; interface uses Classes,