FAQ Database Discussion Community


Load same dll multiple times

c#,.net,dll
I’m trying to load different versions of my dll while my host program is running. I can’t use different AppDomains and unload them, the reason is that my host program is just a test-setup and the real application (Autodesk 3ds Max) doesn’t support it and I can’t change anything about...

C lib file dependency conflicts

c++,c,dll,shared-libraries
So I'm confused about how lib files work, I would prefer to use all lib files and no dlls but am concerned about potential conflicts of a specific type. Say you have a program that depends on lib files a1 and a2, and lib file a1 depends on lib file...

Eclipse IDE Error code -13 [duplicate]

java,eclipse,multithreading,dll
This question already has an answer here: Cannot run Eclipse; JVM terminated. Exit code=13 19 answers Hey guys I'm having some problems with Eclipse. Here's a screen: Here's my error log and .ini: http://pastebin.com/VZ8pf6s9 I have JDK and JRE version 1.8...

Statically link libcurl to project (Still requires DLL)

c++,netbeans,dll,libcurl,libcrypto
I'm using Netbeans IDE with C/C++ plugin. My code compiles without any problem. CURL_STATICLIB is defined (-DCURL_STATICLIB also tried #define CURL_STATICLIB). This is all my linked libs. I'm trying to avoid packaging the exe with multiple DLLs, so I'm trying to statically link it. Even though after link I still...

Microsoft Band and WPF

.net,wpf,dll,microsoft-band,.net-core
I have downloaded the sample code for Band SDK for Windows. Then I added a new WPF project and grabbed the latest SDK through Nuget (Version 1.3.10518.1). Now under packages\Microsoft.Band.1.3.10518\lib, the following folders are contained: netcore451 portable-net45+win+wpa81 portable-win81+wpa81 wpa81 Now as I need .NET 4.5 support I have referenced the...

IS the run time library just some dynamicly linked library files? [closed]

c++,c,windows,dll,runtime
The C standard library for example has some standard functions like printf,. What exactly the relation between the standard library and the run time library ? Is the run time library just the dll's (under windows) part of the standard library? so when I call the printf in my program...

When is it a good idea to make a DLL file

c#,.net,dll
So, I have searched stack for a similar question, without finding anything. So tell me if this is a duplicate. Anyway, What my question is as described in the title. When is it a good idea to make a .dll file. For instance, whenever I start on a new project,...

PHP 5.3.19: Class 'DOTNET' not found

php,.net,dll
When I try to load a DLL using the DOTNET() function I get the above error. However, I have .NET installed on my server (I can verify in IIS) and I have also enabled the php_com_dotnet.dll extension in my php.ini file. This is what it looks like: [PHP_COM_DOTNET] extension=php_com_dotnet.dll However...

Is it possible to create instances of all classes in an assembly?

c#,dll
I have an application which creates and exports a .dll which contains custom icons for WPF forms. I'm trying to create a sort of exploratory test where I can open up an app, and choose a .dll. Once I have chosen the .dll it will look inside of it and...

nodejs:How to call c++ DLL function through nodejs?

c++,node.js,dll
I have a windows c++ DLL. It provides some functions like add(1,2). But I don't have the source code for this DLL, is it possible call functions in this DLL through nodejs, I mean, through web side and http. If it possible, what should I do?

Converting .so file of linux to a .dll file of windows

c,dll,ctypes
I have some C code (having various header files and a make file) compiled as a .so file in Linux(Ubuntu) and a python program which calls the functions of this shared object using Ctypes. Now, I want to use this program on windows. In windows, Ctypes needs a .dll file...

Access C# method in DLL from Java

java,c#,dll,dllimport
I'm having trouble trying to call a function writed in C# from Java. I have already loaded the dll that contains the function. Error message: java.lang.UnsatisfiedLinkError: app.clsValidation.validate(Ljava/lang/String;)Ljava/lang/String; C# code compiled into a 64-bit dll: namespace library { public class clsValidation { public string validate(string txt) { return txt; } }...

Continuing DLL problems with heatmap.py

python,dll,heatmap
I'm having the same problem as has been described previously regarding heatmap.py and some dodgy dll files that spit out an "[Error 193] %1 is not a valid Win32 application" error. My problem is that I cannot find the relevant files - cHeatmap-x86.dll and cHeatmap-x64.dll - on github except for...

Crash C# Application using Marshalling

c#,c++,dll,marshalling,vhosts
I created a C# application which use 2 C++ Dll, the first one work very well, but i have some trouble with the second. I'm flashing a CPU : My dll : [DllImport(@"st10flasher.dll")] public static extern long SetCom(string PortName, long comspeed); [DllImport(@"st10flasher.dll")] public static extern long LoadFile(string FileName, ref long...

'The command line is too long' when linking .obj files in Windows command prompt

windows,maven,dll,cmd,linker
As a last step to my maven build on Windows, it tries to create a dll file by linking around 1500 object files. Looks something like this: cl.exe foo.dll (around 1500 .obj files) (couple of other statically linked libraries) The build fails with just one statement: The command line is...

Where to place local dll in a ASP.NET project?

c#,asp.net,exception,dll,pinvoke
I have a ASP.NET project where I need to pinvoke the following function: [DllImport("NetSh.dll")] public static extern int RunAsUsr(string pcs_admin, string pcs_user, string pcs_password); The problem is that i get the following exception when I call the function: Unable to load DLL 'NetSh.dll': The specified module could not be found....

C# Namespace not found for DLL

c#,dll,c++-cli,wrapper
Ok, I will preface this by saying I did do a look up and read a lot of similar questions and answers on here before posting this. Background Info Using Visual Studio Professional 2013 Goal: This project is for my own amusement and to try to learn as much as...

Attempt to load the C runtime library incorrectly in Winamp's in_midi.dll

c#,.net,dll,pinvoke,winamp
I am trying to load a Winamp input plugin and work with it in C#. According to the Winamp SDK, this is the proper way to load a plugin: in_mp3_lib = LoadLibraryW(path); if (in_mp3_lib) { PluginGetter pluginGetter = (PluginGetter)GetProcAddress(in_mp3_lib, "winampGetInModule2"); if (pluginGetter) { in_mp3 = pluginGetter(); } } So I've...

FSharp.Data.dll not found

json,dll,f#-data
I am creating an example for our next F# meetup and have run into an issue. I have downloaded the FSharp.Data v2.2.1 to try the JSON tutorials to parse (stock options) data downloaded from the web. I have been struggling with this issue for almost a week now. I have...

Can DLLs linked via import libs be unloaded before the host DLL is unloaded?

c++,windows,dll,dllimport
I have a Foo.dll that links to a Bar.dll via Bar's import libs (Bar.lib). Foo.dll also delayloads Bar.dll so it's only loaded when it's first called. Now, if Foo.dll calls a function exported by Bar.dll so Bar.dll is loaded, can Bar.dll be unloaded before Foo.dll is unloaded from the process?...

How to run a method on the first call to a .NET dll?

c#,dll
My scenario Many classes in my DLL leverage some common services like logging. These common services need to be initialized. Since I don't know which classes will be constructed first, I include code similar to this in all constructors Logger.Configure(); Question Is there a way to subscribe to an event...

how to edit or see the source code for dll files

dll
I have a DLL file for old game(age of empires) I just want to edit that file or see the source code. I tried reflector toll and some others, but without any result so, 1- how can I edit or see that DLL file?? 2- can I know In what...

System.Windows.Interactivity must be referenced in the main project

c#,wpf,dll,reference
So I have a WPF project and my interface in a different project than the main one. I went to reference System.Windows.Interactivity, but it would not work. Not until I added it as a reference to the main project as well... This is the first time this has ever happened...

The type 'System.Runtime.InteropServices.SafeHandle' exists in both 'System.Runtime.InteropServices.dll' and 'System.Runtime.Handles.dll'

c#,dll,reference,compiler-errors,interop
I'm currently porting a Windows 8.1 app to a Windows 10 UAP app which uses interop to communicate between C++ and C# and I'm having the following error popping up : $(ProjectName).Interop.g.cs : error CS0433: The type 'System.Runtime.InteropServices.SafeHandle' exists in both 'c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETCore\v4.5.1\System.Runtime.InteropServices.dll' and 'c:\Program Files (x86)\MSBuild\Microsoft.NetNative\x86\ilc\lib\McgDependencies\System.Runtime.Handles.dll' From...

How to free memory in C# that is allocated in C++

c#,c++,memory-management,dll,memory-leaks
I have a C++ dll which is reading video frames from a camera. These frames get allocated in the DLL returned via pointer to the caller (a C# program). When C# is done with a particular frame of video, it needs to clean it up. The DLL interface and memory...

Running two versions of same Dll parallel in Asp.Net

c#,asp.net,.net,dll
I need to run two versions of same Dll to be run on my website simultaneously. So i have created a folder inside Bin and shown the second Dll path like this <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="AWSSDK" culture="neutral" publicKeyToken="9f476d3089b52be3"/> <codeBase version="2.3.40.0" href="FILE://E://Live /bin/V-2/AWSSDK.dll"/> </dependentAssembly> </assemblyBinding> and added my first...

Get IIS to load dlls used for reading config from a specified directory

c#,asp.net,iis,dll,app-config
We have a classic ASP service, which loads a .net com object via a call to CreateObject passing in the name of the COM object. This COM object then gets passed the name of a pure managed class & dll to load and activate, which it does via reflection. These...

Translating DLL Call functions from C to Delphi

c,delphi,dll
So, as the title says, I'm in a struggle with translating a few functions for calling DLL, which I have documentation about in C, but I need to use it in Delphi. After few initial tries, and after solving some compiler errors after translation, with the help of you guys...

Running msi causes “module failed to register” in 32bit win7,but works in 64bit win7

c++,windows,dll,windows-installer
I'm trying to deploy my project and create an installer. I've created a msi file in vs2005. When running the .msi setup wizard, i'm getting the error: "Module abc failed to register. HRESULT -2147010895. Contact your support personnel." The module that failed to register is a C++ com dll.But in...

Call Delphi XE6 unicode dll from C# asp.net

c#,delphi,dll
before opening the topic searched any more responses served me, my error remains, have created a dll in Delphi XE6 64x which is as follows: function GeraChave(Action : PAnsiChar; StrCrip : PAnsiChar; Cnpj : PAnsiChar; idPC: PAnsiChar): PAnsiChar; stdcall; var KeyLen : Integer; KeyPos : Integer; OffSet : Integer; Dest,...

DLL References doesn't work in App_Code classes

asp.net,dll,app-code
I get some troubles with a DLL reference. I have MySql.Data.dll in my bin folder. And I added the reference of this dll to my project. I can well use classes from this dll (like MySqlConnection, MySqlClient, etc) in aspx.cs but i cannot use it in classes from files from...

holding constructed static arrays in memory for multiple files c++

c++,arrays,dll,linker
I have a few arrays that I need to hold in memory for the duration of my program. The arrays are used as look up references by different files so I thought I should make a DLL to hold them in. The main problem I seem to run into is...

Where is Microsoft.Build.Tasks.Core.dll located?

.net,dll
I'm trying to sign a ClickOnce application using a method overload that was specifically added in VS 2013 Update 3. (per this suggestion) The class he is using is described by MSDN here, and it says the class comes from Microsoft.Build.Tasks.Core.dll. Notice that the usual "Other Versions" dropdown is missing,...

Object instantiation using Reflection works in VB.NET but not C#

c#,.net,vb.net,dll,system.reflection
I'm trying to instantiate an object from a dll without referencing it. I can do it using Reflection in VB.NET but can't figure out how to do it in C#. In VB.NET: Public Class Form1 Dim bytes() As Byte = System.IO.File.ReadAllBytes("\\path\directory\file.dll") Dim assmb As System.Reflection.Assembly = System.Reflection.Assembly.Load(bytes) Dim myDllClass As...

How to call csImageFile.dll (com) functions in c#

c#,asp.net,dll,vbscript
I want to convert a classic asp / VB script code section to c#. The code uses a dll csImageFile.dll that specifically merge multiple tif images Legacy function nPage = 1 Set csImg = Server.CreateObject("csImageFile.Manage") do while not rs.eof csImg.ReadStream "tif", rs("imagedata").value csImg.AddToTif nPage nPage = nPage + 1 rs.movenext...

Create C# dll and use method with powershell

c#,powershell,dll
I created a simple C# dll and registered it using RegAsm.exe. One very simple method is invoked without parameters and returns a number, here is a simplified version. namespace AVL_test { interface ITestClass { int GetNumber(); } [ComVisible(true)] public class TestClass: ITestClass { public TestClass() { } public int GetNumber()...

How to use C++ dll from C#

c#,c++,.net,dll
I'm trying include c++ library (DLL) in my c# project but every time I do that I get following error message in VS2012 A reference to 'C:\Users\HiepDang\Desktop\mydll.dll' could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component. When...

Visual 2015 Compiling DLL

c++,visual-studio,dll,g++
I'm creating DLL that should work as module (runtime loading) It works on linux/windows with dlopen etc.. It looks like: .cpp std::string pomnoz(std::string &s, std::string &ds) { std::cout << s << " " << ds << std::endl; return s.append(ds); } .h #ifdef __cplusplus extern "C" { #endif std::string pomnoz(std::string &s,...

Function pointer in DLL call - how to handle in C#?

c#,dll,callback
I'm using a native DLL that is called out of my C# application. One of the DLL-functions is defined like this: int set_line(const int width,fct_line_callback callback) fct_line_callback itself is defined as typedef int (*fct_line_callback)(double power,void *userData); So how can I use this function out of my C#-application? Is there a...

Is storing personal libraries as console applications a bad idea?

.net,dll
I've started making my default library type a console application. The immediate benefit is that I can easily implement integration tests within the main application. Is there a down side to not having my libraries as standard DLLs? Everything seems to be working fine thus far. I'll always have access...

How to return an array of structs to Console Application from Class Library

c++,arrays,dll,structure
I have a Structure :- Test.h typedef struct employees { char* name[5]; int empi_id; }; Test.cpp I created a function where I need store the values within these structure. int Disp() { employees e[5]; e[0].empi_id=10; e[1].empi_id=100; e[2].empi_id=500; e[3].empi_id=1000; e[4].empi_id=5000; return 0; } TestDll.cpp Console Application: void main() { LoadLibrary(("TestDll.dll")); int...

Its is better to create class lib or portable class lib?

c#,.net,asp.net-mvc,dll,portable-class-library
I have to use some API in my project and for that my boss asked me to create lib for that API. Its .Net project and may be in future it may have Android app. But for now he wants me to create lib in c# by hitting on API....

NLog not writing from referenced dll

c#,logging,dll
I have a dll that I created for sending email. I have NLog included in that project that logs to c:\logs{logfilename.log} <--This is either an error or event log. When working with the project locally it works just fine and writes out to the file during testing. When I reference...

Win64 - JNI: UnsatisfiedLinkError: Can't find dependent libraries

java,dll,jni,unsatisfiedlinkerror,win64
I have a own JNI dll which depends on a few other dlls (Zero MQ to be precise). I have compiled these dependencies on Windows 7(64bit) via Visual Studio. I defined that I get 64-bit dlls. On the developer machine it works just fine. But if I move those dlls...

Pinvoke / call native Windows API function from C#

c#,dll,winsock,winsock2,winsockets
from within my C#-application I use functions of an external DLL. This DLL itself uses network functions. So it is necessary to initialise Winsock out of my C#-application to let the network sockets work for this DLL. That's how I try to execute WSAStartup for initialisation, but it does not...

Prism 5.0 External 3rd party dll

c#,dll,prism-5
so I am a bit confused on how to word this... The program we are using utilizes a third party DLL developed by a vendor. This DLL is not a prism module its a basic DLL. When adding this regularly as c# requires it fails to initialize the module that...

Specifying an Assembly to Create an Object

c#,.net,winforms,dll,.net-assembly
I have a C# application. It has a referenced class library Generic.dll. I have a Document class inside Generic.dll. namespace Generic { public class Document { public virtual string ObjectName() { return "Generic"; } } } Then I created another class library Custom.dll and created a Document by inheriting the...

php: loading oracle driver gives error “Unable to load dynamic library - The specified procedure could not be found.”

php,oracle,dll,pdo
I seem to have a strange problem with PHP. I've migrated a bunch of software from one server to another. On the server some scripts make a connection to Oracle, so to be able to make a connection the oracle client is installed and a tnsnames file is in place....

.NET Application looking for DLLs in locale specific sub-folder

.net,dll,locale,app-config,subfolder
My company have some internal utility libraries containing things like base services, useful extension methods etc. I have recently completely re-written these from the ground up and have packaged them as nu-get packages, hosted on our internal network. When I've added added a NuGet reference to the packages in a...

how to connect and read values from kepware using OPCAutomation.dll

dll,plc,opc
I am creating a small c# program to connect and read value from kepware server using OPCAutomation.dll, but unable to get its syntax? OPCAutomation.OPCServer _OPCServer = new OPCAutomation.OPCServer(); _OPCServer.connect("", ""......); what values will come inside these brackets?...

Compiling standalone Qt application using MinGW

c++,windows,qt,dll,mingw
I am trying to build a standalone Qt app without any DLLs needed. I recompiled Qt 5.4.1 statically. When I compile and run an application, it doesn't require any Qt DLLs, but it requires libgcc_s_dw2-1.dll instead. I have also edited my mkspecs before configuring and building Qt, I edited these...

Reference Two DLLs with the same namespaces and types

.net,vb.net,dll
I have two versions of the same DLL, i.e. LibV1.dll and LibV2.dll. Both libraries have the same namespaces and types, but are not compatible. I need to be able to reference both at the same time in a VB.Net project in order to upgrade data from the old version to...

VC++ .net: Functionality from managed DLL is not exported

c#,c++,visual-c++,dll
I am very new to the .NET platform (coming from the JVM and having some limited C/C++ experience) and trying my first managed C++ class library. This is to serve as a bridge to a third-party DLL I got and I have to interface. I tried it with BridJ and...

When to free a dll after exporting object

c++,c,dll,free
i am exporting a function from a dll the following way: extern "C" __declspec(dllexport) carsim::ICar* __cdecl createCarPlugin() { return new CarPlugin(); } In my main-Program I explicitly load the dll to extract this method. The declaration of the interface ICar is recognized by both - the dll and the main-program:...

Returning into object from Assembly.LoadFrom() in C#

c#,dll
I'm trying to make an expansion setup for this game I'm developing, (not going to go into detail about), but all a single expansion will need is the 1 .dll file added into the Expansions folder I have added. I have figured out how to access these .dll added into...

Intermittent Access Violation when using C# to access C++ DLL

c#,c++,dll
I'm linking from c# to a quite complex c++ dll. I need to create a lot of dllexport funtions so I can use the dll in c#. To get started, I added a .cpp file and created a simple test function: c++: extern "C" __declspec(dllexport) int32_t Test(){ return 10; }...

UnsatisfiedLinkError exception while working with dll and java jni4net

java,c#,dll,unsatisfiedlinkerror,jni4net
I have been working on reading c#(dll) function from java through jni4net and in core java I have succeeded in getting the value from the dll function but now I have created one Dynamic Web Project and tried to use same functionality in servlet. But now only the dll file...

Program does not go in order through constructor thus leading to uninitialized variables

c++,qt,dll
I discovered this issue after trying to compile my program in release mode using Qt 5.4 using MSVC 2013 32bit. Up until now everything has worked fine in debug, but I am having error code: 0xc0000409 thrown every time I try to run it in release. It looks like this...

Do I really need __declspec(dllexport) when cross-compiling a DLL with MinGW and wclang?

c++,dll,mingw,wclang
There are similar questions here but they don't quite answer my question: When to use __declspec(dllexport) in C++ Why do I need __declspec(dllexport) to make some functions accessible from ctypes? When I cross-compile a DLL from Mac OS X using MinGW and wclang, why does my DLL work fine without...

BadImageFormatException - How to reference System.IO.Compression in my Windows Phone 8.1 app?

c#,.net,dll,windows-phone
I need to reference System.IO.Compression to use ZipArchive class in my Windows Phone Silverlight 8.1 app. I add it with Object Explorer so it copies the dll C:\Program Files\Reference Assemblies\Microsoft\Framework.NETCore\v4.5.1\System.IO.Compression.dll to my root path project, which is copied in the .xap package. I can build but my app crashes at...

Ensure only one class can access a reference dll?

c#,dll,visual-studio-2013,intellisense
I have a project where I want only one class to have access to a dll. I would be content with hiding the dll from intellisense, but still having access to it if that is an option. Either way, I want only one class to use the dll and for...

Copy dll files to .exe directory in ClickOnce deployment

c#,c++,dll,deployment,clickonce
My .NET project depends on a bunch of native dll libraries that should be copied into the same directory as .exe file. Dll files are added to main project to "ExternalDependencies" folder and are copied to output folder upon custom post-build action. When I publish my app with ClickOnce utility...

Linking to a static lib compiled with MSVC

dll,rust
I'm trying to link with a simple C lib on windows against Rust library My lib is .h extern "C" { void say_hello(const char* s); } .cpp #include <stdio.h> void say_hello(const char* s) { printf("hello world"); } My Rust file #[link(name="CDbax", kind="static")] extern "C" { fn say_hello(s: *const libc::c_char) ->...

py2exe fails with “No module named 'clr'” when trying to build exe from script using pythonnet

python,dll,clr,python-3.4,python.net
I created a python script that uses pythonnet. The script is in a file named main.py. When I run the script from the command line (simply typing main.py at the Windows command prompt), the imported pythonnet module clr works fine. But when I try to build an exe I get...

Batch Script that Installs dll to Assembly folder

c#,.net,batch-file,dll
Hi I hope the master of Stack overflow can assist me on this one. So heres the thing. For some reason our dev deployment is done by copying an updated dll file to the assembly by dragging and dropping it to the C:\Windows\Assembly folder. I tried to create a batch...

Determine .lib / .dll with header file

c++,dll,header,static-libraries
I have 3rd party library in my program. For example : #INCLUDE <3rdPartyHeaderA.h> #INCLUDE <3rdPartyHeaderB.h> int main(int argc, char** argv) { // some stuff } How do i know 3rdPartyHeaderA.h is using which particular .lib or .dll. I looked over 3rdPartyHeaderA.h but there is no information. I'm asking this question...

Using different versions of the same DLL in a project

c#,.net,dll
In my project I have to use different versions of AWSSDK dll's, in order to make this i took help of this post . and added one of my dll in to a folder named V-1 inside bin folder. Then made config changes like this <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity...

Missing DLL even though the directory containing it is in the path

windows,visual-studio-2012,dll,vtk
I'm currently trying to build and run some of the example of the VTK. Building goes just fine, however when trying to run the examples I have some missing DLLs errors. I am using windows 8.1, Visual Studio 2012. My path actually include the directory where all the dlls are...

Why is a “user breakpoint” called when I run my project with imported .lib, not when code is inline?

c++,visual-c++,dll,runtime-error,breakpoints
The Situation I am writing a wrapper library for GPIB communications for setting up specific instruments according to a clients specifications to automate some of their processes. I have to use C++ and the old '98 compiler in VC++ 6.0 running on a Windows NT machine to maintain compatibility with...

Breaking as the code execution enters the Dll or Lib space

c++,visual-studio,debugging,dll
I'm debugging a Dll used by OS mechanisms using microsoft visual studio(In my case it is a minidriver). I want the execution to break as it enters the dll code I want it because I don't know when base smart card CSP calls which function. Is there any means to...

How to unregister Python COM server

python,windows,vba,dll,com
I'm developing a very simple COM server for educational purpose. I can get it to work but every time i have to change anything (code/logic) , i have to delete every instance of the COM Server Name in the regedit.exe under various headings till it disappears from the PythonWin >>...

Are you allowed to use any random DLL file as library? [closed]

c#,c++,dll
I am trying to create a little program in c# for my fan control and found a dll file in a program of lenovo which has all the methods I need. I have been googling to find out if you are allowed to use any random library for your c#...

How to use swig with compiled dll and header file only

python,c++,dll,wrapper,swig
I have read some docs from SWIG documentation (related to c++ code), but can't figure out if it is possible to genereate Python extension module in case I have compiled dll (no source code provided) and header file with all functions declared in dll. If someone has the same problem...

In VC++, is there any way to know the export class of a dll without any header files?

c++,visual-c++,dll,export
If there'are a few export class in a C++ Dll, but I don't have the Dll shared header files. So I don't know the definition of these export class, the only thing I know is the class name. Is there any way to find these export class and use them?...

How to find the dll which causes a memory leak and not directly referenced by application

c#,wpf,dll,memory-leaks,msvcrt
I am writing a WPF application which uses a number of unmanaged DLL's. Something in the program is causing memory leak and I monitored the application using Redgate ANTS 8 Memory Profiler. ANTS shows that the memory usage of MSVCR110.dll is constantly increasing. The question is that can managed code...

How to organize dll files in project?

c#,visual-studio,dll,organization,external-dependencies
I would like to organize library files in my project. I currently have about 30 libraries (devExpress, system (winforms), system (others), project references) in a single project. Is it possible to organize such a view? For example, is the way to create a directory structure in Visual Studio for that...

Pass structure (or class) from C++ dll to C# (Unity 3D)

c#,c++,dll,plugins,interop
I am writing a wrapper to get some data from a sensor. While I have no problems with passing int, float and arrays of them, I have difficulties to grasp how to pass a structure. Code summary C++ side The structure is as follows: struct HandInfo { int id; float...

program linked to SFML dlls wont start, returns 0xC000007B or missing __gxx_personality_v0

c++,dll,sfml
I was trying to compile example from SFML page http://www.sfml-dev.org/tutorials/2.3/start-cb.php (at the bottom) I dowloaded the version for GCC 4.9.2 DW2, set everything needed (linker, directories) and it compiled without errors. When the application starts it says that it needs .dll files so I copied them from SFML/bin directory. Then...

Signing a DLL assembly with public key token

c#,.net,dll,strongname,assembly-signing
I inherited a C# .NET application that needed slight modifications to some of the path name strings in one of the DLL assemblies. I do not have the source code, unfortunately. I made the necessary modifications using ILSpy and the Reflexil plugin. When I save the DLL, I'm told the...

Including library in AIR Native Extension causes the error, “The extension context does not have a method with the name…” for all methods

c++,c,actionscript-3,dll,air
I am working on an AIR Native Extension (ANE) for Windows desktop. The point of this extension is to be able to call out to a third-party C library, which consists of two .h files defining the method signatures/typedefs, and a .lib file. Before including the third party library in...

How to remove error of incompatible variable types in LoadLibrary() function?

c++,dll,types,loadlibrary
I have one line in my C++ program HINSTANCE hInstLibrary = LoadLibrary("DLL_tut.dll"); Here I'm getting error saying that error C2664: 'LoadLibraryW' : cannot convert parameter 1 from 'const char [12]' to 'LPCWSTR' I'm trying to implement program given in link http://www.codeguru.com/cpp/cpp/cpp_mfc/tutorials/article.php/c9855/DLL-Tutorial-For-Beginners.htm Tried finding some solutions and found this one closest...

Embarcadero C++Builder: Separate debug/release DLL references possible?

c++,dll,c++builder
Depending on the build type (debug, release) of my main executable, I want to link against the matching builds of my DLLs. What is the correct way to accomplish this using the C++Builder IDE? Details: I am using Embarcadero C++Builder XE8 (trial, BCC64). My software consists of one executable and...

JNA couldn't find the specified procedure in dll file through java

java,c#,dll,enums,jna
I am trying to access dll procedure through java but my java method is unable to find the procedure. The dll file is loaded successfully but the the procedure from C# code named Login I can't call. Below is the def of Procedure in ADHelper.dll: public static ADHelper.LoginResult Login(string UserName,...

How to run a dll as a service?

c++,c,winapi,dll,service
I know how to write a dll and how to write a service and how to run a dll with rundll32, but now I want to write a dll that install as a service in windows I don't know if that's possible or which function in dll should be exported?...

C++ Access violation write to 0x00000000 in dll in mql4

c++,dll,mql4
First, I am new to C++ (nearly a week into it), so forgive me if this is obvious. Also, I have hunted through many posts with similar issues. Either my understanding is just not developed enough, or none had relevant info to help me understand this issue. In Metatrader 4,...

How can I share a class library between multiple applications?

asp.net,dll,architecture
We have numerous small applications in our organization, most of them .NET web applications. Each of these has a seperate authorization system. I would like to create 1 library of functions to do authorization checks to use in all these applications. I would like to have this library centralized, so...

Importing C++ custom library functions into C#

c#,c++,dll,import,dllimport
I currently have a large C++ library that I need to incorporate into a C# project. I was successful in using DllImport to get access to some functions from my library, like this: [DllImport("MyLib.dll")] public static extern int SampleFunction(string param); However, I can't seem to figure out how to make...

The linker link, but the executable ask for another dll

dll,linker
I'm using mingw. I have a dll named gtksourceview-3.0-1.dll, my program is compiled without problem, the linker doesn't report any error, but when I lauch the program, it is asking for another dll: gtksourceview-3.0-0.dll. When I compile with g++, I pass as argument: -lgtksourceview-3.0. Why my program is searching for...

DLL compiled from C source code. Not able to use in excel VBA. File not found error

c,excel,vba,dll
I have written a function in C (for some bitwise operations on 64-bit) and I want to use that function in my excel vba macro. I used steps described here to create a DLL file using cygwin (64-bit). Here are the commands I used to create the actual dll: gcc...

C# calling batch file failed to copy dll files to System32 folder

c#,batch-file,dll,windows-7-x64,system32
I have created a batch file that copies some dll files into System32 folder. I ran this batch from my program written in C# code: string path = @"ABC\install.bat"; ProcessStartInfo procStartInfo = new ProcessStartInfo() { UseShellExecute = true, CreateNoWindow = false, FileName = "\"" + path + "\"", //Arguments =...

Get VU of VSXu artiste with C++

c++,memory-management,dll,base-address,cheat-engine
this is my code so far: #include "iostream" #include "Windows.h" #include "stdio.h" using namespace std; int main() { HWND hWnd = FindWindow(NULL,TEXT("Vovoid VSXu Artiste 0.4.0 [Windows 64-bit]")); if (hWnd == 0) { cerr << "Cannot find window "<< endl; } else { DWORD pId; GetWindowThreadProcessId(hWnd, &pId); cout << "Found Window...

Python ctypes for HANDLE

python,dll,ctypes
I have a DLL function with prototype as follow: short Connect(HANDLE* pHandle, UINT* pTimerID, LPCTSTR strDestination, LPCTSTR strServiceName, int nProtocol, int nType) The function description as follow: pHandle: socket handle.[out] pTimerID: Timer ID using sending alive packet to a camera.[out] strDestination: camera network IP.[in] strServiceName: camera network port.[in] nProtocol: address...

Force Qt5 to load SSL dlls from exe dir

c++,windows,qt,dll,qt5
Update Sorry, guys, I was incorrectly determined the problem. All is working, error was in "other program logic". Please delete or close the question. Qt5 is designed to load libeay32.dll and ssleay32.dll on program start before any instruction in main() (because it is static). (Details: it is located in qtbase\src\network\ssl\qsslsocket_openssl_symbols.cpp:...

Controlling the order of dllmain() calls while being injected to another process

c++,windows,dll,dll-injection
Is there a way to somehow control the order DLLs are loaded? This is mainly related to the limitation one must obey while present within DllMain() function. BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved) { switch (fdwReason) { case DLL_PROCESS_ATTACH: { SHGetKnownFolderPath() } case DLL_PROCESS_DETACH: { DllMainProcessDetach(hinstDLL, lpReserved); return...

Call a function of VB DLL file from java using JNA

java,vb.net,function,dll,jna
I am new to using JNA.In all what i want to do is use the vb DLL file in java & call the functions from java. I created a simple java code for this. import com.sun.jna.Library; import com.sun.jna.Native; import com.sun.jna.Platform; public class Main { public interface test extends Library {...

Unable initialize the Matlab dll in c++

c++,matlab,dll
I'm using Windows 7 x64 with Matlab R2012b x32 and VS2010. I want to call a Matlab function named add in C++. So I convert add.m to a dll using the mcc command, and add it to my project. But I have got a error after I tried to initialize...

Loading an assembly from a dll's Byte array

powershell,dll,.net-assembly,7zip
I am trying to load an assembly using this: $pathToDll = "C:\zip\SevenZipSharp.dll" $pathTo7zDll = "C:\zip\7z.dll" $dllByteArray= [System.IO.File]::ReadAllBytes($pathToDll) [System.Reflection.Assembly]::Load($dllByteArray) This doesn't throw an exception however when I want to use the library SevenZip.SevenZipExtractor like this: [SevenZip.SevenZipExtractor]::SetLibraryPath($pathTo7zDll) It says: Exception calling "SetLibraryPath" with "1" argument(s): "The type initializer for 'SevenZip.SevenZipLibraryManager' threw an...

What are the different ways to know which all classes and methods present in a DLL?

c#,dll
I was in interview and interviewer asked me the below question. How to know what classes and methods are present in DLL ? I was confused and said, "we can use tool or refactor that." Can someone explain the different ways to find everything from DLL (from code as well...

Debugging a C++ Program that uses a 3rd party dll

c++,debugging,dll,visual-studio-2005
I'm currently working on a project that uses a 3rd party .dll to interface with some hardware, and wanted to debug my code that uses this library. However, none of the breakpoints that I set are hit during execution of the code. Instead, the breakpoints are hollow and a pop-up...

Use C++ DLL library project in C++ /CLR project

c++,visual-c++,dll,clr
I'm trying to use a unmanaged C++ DLL library project in a C++ /CLR managed wrapper project, but because the unmanaged project uses <thread> the managed project won't build: error C1189: #error : <thread> is not supported when compiling with /clr or /clr:pure. to be clear: the managed project itself...