dll

Is it secure to use a DLL for the main logic of your .NET application?

If a user knows almost anything about coding in .net, and they see a .dll, they have the unfortunate ability to call your public functions and subroutines. I know you could try a "key" system, where it will check for a certain "key" as an argument, and only run the code if the "key" is valid, but I just ran some code and a .dll that I ma...

How to get a full stacktrace from a crashed mixed mode exe/dll ?

Hi ! I wrote an application in C++/CLR. It uses a native lib/dll. On rare occasions, it crashes insider this native dll. I then get a stacktrace, but only up to the managed part, the inside native part is left out. Is there a way to let it display the whole stacktrace? I made the following test: I added a line of code inside the native...

Global (process wide) properties in Win32

I am trying to share some data across DLLs in a project which has an extremely complicated dependency structure (numberous DLLs). I want to be able to associate a key with some data in one part of the application, and then extract that data by supplying the appropriate key in some other part of the app. In a way, one can say that I loo...

anyway to write dlls in linux?

Is there anyway to write dlls in linux? Do I have to install windows to write dlls in linux? Right now one of my courses are pretty retarded and requires me to write a dll for this. ...

DLL's in a ASP.NET Application and SourceSafe/Sharing between computers

I have an application that uses currently two DLL's for external libraries (AjaxControlToolkit is one of them) I was wondering the best way for a colleague of mine to check out my application from our SourceSafe database and use these libraries. I don't know much about utlising external libraries other then really adding them as a refe...

How to find out why my dll depends on zlib1.dll?

Hi there, I'm devdeloping a DLL in VS2008. When I examine the DLL in Dependency Walker, I can see a dependency on zlib1.dll. How can I find out where this comes from? My DLL is (statically) linked against HDF5.lib, HDF5_CPP.lib, and GSL.lib. I'm not including any zlib headers, so I'm a bit clueless about this. I know HDF5 depends on zlib...

Use Pantheios logging framework from a dll

Im a trying to use pantheios logging framework from inside a c++ dll. I have successfully built the dll and it executes through my test application (C++ MFC Application). I have used implicit linking with the following includes: #include <pantheios/implicit_link/core.h> #include <pantheios/implicit_link/fe.simple.h> #include <pantheio...

Upgrade a reference dll in a C# project without recompiling the project

I need to take a built version of an C# application and change one of the reference dll's. What is the best way to do this, I have specific version turned off on the reference dll but as soon as I test replacing the dll with a newer version, I get the "Could not load file or assembly XXXXX, Version=XXXXX. Is there a way to stop the loa...

Tracking down slow managed DLL loading

I am faced with the following issue and at this point I feel like I'm severely lacking some sort of tool, I just don't know what that tool is, or what exactly it should be doing. Here is the setup: I have a 3rd party DLL that has to be registered in GAC. This all works fine and good on pretty much every machine our software was deployed...

How can I embed a version into a DLL?

I have a project that is mainly Java, but also uses some C, which is built into a DLL, using ant for the whole build. I want to add versioning, so that the same version is embedded in the jar files, and also in the dll files. For the jars it was simple, but how can I do this for the dlls? I know you can embed different resources like a ...

"Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call" after successful C# callback from the C++ code of GameSpy lib.

I'm making a C# application which is using GameSpy C code (the GP part). The C code is calling a callback (which is C# code) succesfully, but I get this error "Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call" right after the callback is done. I've made a DLL out of C code, BTW like this: /...

To which segment do static variables from a dll go inside a process?

The static variables in an exe go into data segment of the process and initized at the start up of the process. So, if my process dynamically load a library, which has static variables using dlopen or something, to which segment these static variables will be mapped to. Also when these static variables will be initialized? My underst...

referencing System.Windows.Automation

Hi, I wanted to try out some of the automation stuff available through BugSlayer, but am having problems with the references. I'm trying to figure out how to reference the System.Windows.Automation library in visual studio. I have the .NET Framework v3.5 installed, and VS 2008, but neither the UIAutomationClient nor System.Windows.Aut...

Inno Setup: Uninstall Dll Server

Greetings, With my app I install a Dll server for the Windows shell. The server is registered and unregistered properly by Inno by using the flag "regserver". However if any explorer windows are open the dll is in use and cannot be deteled by Inno. How can I delete the dll automatically and uninstall the app properly? Regards, Cosmin ...

Data symbol exported in both DLLs despite dllimport

Hello, I have a problem concerning the export/import of a global variable in a DLL. I have a static library which contains a global variable such as : In the header : #ifdef _ENGINE_EXPORTS extern __declspec(dllexport) Globals data; #else extern __declspec(dllimport) Globals data; #endif In the source file : #ifdef _ENGINE_EXPORTS ...

Dllimport can't import an old Borland dll

I have a lot of legacy code which I currently compile using an antiquated install of Borland C++ 3.0. There's a rules engine in this code that I'd like to extract and use in a C# .NET application. The thing is, if I extract the rules engine into it's own DLL, I want to be able to call this DLL from both the existing legacy code which I...

how to call a C# dll from unmanaged c++ using IDispatch?

I have a C# dll that I need to call from unmanaged C++. The main problem that I have is that my c++ code corresponds to an excel add-in, that can be installed for excel 2003 and excel 2007, when I install my add-in in excel 2007, and I try to call my C# dll, it works just fine, but for some reason that I still haven't been able to find, ...

C++ How to communicate between DLLs of an application?

Hey, I have a application and two Dlls. Both libraries are loaded by the application. I don't have the source of the application, but the source of the libs. I want to instantiate a class in lib A and want to use this instance also in lib B. How do I do this? I'm not sure, but I think that both libs are used in different threads of th...

newbie C runtime library questions in Visual Studio 2008

I've just gotten an application to compile and run by telling my VS 2008 project to ignore libc.lib in the linker->input section off the project properties menu. Before I did this VS gave me the old "fatal error LNK1104: cannot open file 'LIBC.lib'" message. I'm not sure how this app compiles if I'm ignoring the crt, but that's obvious...

Statically linking a DLL in Windows

Consider this situation: I'm creating a DLL (let's call this dllA), which, in turn, calls functions in other DLLs (let's call these dllX, dllY and dllZ). If someone else wanted to use dllA, they'd need a copy of dllX, Y and Z as well. Is there a way to build dllA such that the needed functions in dllX, Y and Z get linked into dllA? I ...