dll

Can a windows dll retrieve its own filename?

So a windows exe file has access to the command string which invoked it, including its path and filename. eg. "C:\MyApp\MyApp.exe --help". But this is not so for a dll invoked via LoadLibrary. Does anyone know of a way for a dll to find out what its path and filename is? Specifically I'm interested in a Delphi solution, but I suspect ...

Why won't Entourage work with Exchange 2007?

So this is IT more than programming but Google found nothing, and you guys are just the right kind of geniuses. My Exchange Server 2007 and Entourage clients don't play nice. Right now the big issue is that the entourage client will not connect to Exchange 2007 ( Entourage 2004 or 2008) The account settings are correct and use the ...

How to trace COM objects exceptions?

I have a DLL with some COM objects. Sometimes, this objects crashes and register an error event in the Windows Event Log with lots of hexadecimal informations. I have no clue why this crashes happens. So, How can I trace those COM objects exceptions? ...

IIS 6/COM+ hangs

I have a web application that sometimes just hangs over heavy load. To make it come back I have to kill the "dllhost.exe" process. Does someone know what to do? This is an Classic ASP (VBScript) app with lots of COM+ objects. The server has the following configuration: Intel Core 2 Duo 2.2 GHz / 4 GB RAM Windows Server 2003 Web Editi...

Determine Loaded Assemblies

How can I determine all of the assemblies that my .NET desktop application has loaded? I'd like to put them in the about box so I can query customers over the phone to determine what version of XYZ they have on their PC. It would be nice to see both managed and unmanaged assemblies. I realize the list will get long but I plan to slap ...

Overloaded functions in C++ DLL def file

I'm writing a C/C++ DLL and want to export certain functions which I've done before using a .def file like this LIBRARY "MyLib" EXPORTS Foo Bar with the code defined as this, for example: int Foo(int a); void Bar(int foo); However, what if I want to declare an overloaded method of Foo() like: int Foo(int a, int b); As the de...

Asp.net Reinstalling a DLL into the GAC

I'm trying to reinstall a DLL in the GAC, everything seems to work fine but the web application accessing it still seems to be using the old one. The old DLL is the same version as the new one with only a minor edit, it will be used by 50 different sites so changing the version then changing the reference in the web.config is not a good...

Exporting a C++ class from a DLL

Most of my C/C++ development involves monolithic module files and absolutely no classes whatsoever, so usually when I need to make a DLL with accessible functions I just export them using the standard __declspec(dllexport) directive. Then access them either dynamically via LoadLibrary() or at compile time with a header and lib file. H...

Very simple C++ DLL that can be called from .net

Hi, I'm trying to call a 3rd party vendor's C DLL from vb.net 2005 and am getting P/Invoke errors. I'm successfully calling other methods but have hit a bottle-neck on one of the more complex. The structures involved are horrendous and in an attempt to simplify the troubleshooting I'd like to create a C++ DLL to replicate the problem....

Debugging DLL Called With CeRapiInvoke

I'm trying to debug into a C dll that is invoked on a Windows Mobile device using CeRapiInvoke() (Technically RAPI.Invoke() from OpenNETCF) from a Windows box. I'm very familiar with attaching to a process that is already running to debug a loaded dll (I've done it many time with Windows Mobile services) but I can't seem to figure out w...

How to ensure that the same thread is used to execute code in IIS?

We have a third party dll that is used in our web service hosted in IIS6. The problem is that once this dll is loaded into memory, the exception AccessViolationException gets thrown if a thread different then the one that created it tries to execute any code within the dll. The worker process is multi threaded and each call to the web se...

In what order are locations searched to load referenced DLLs?

I know that the .NET framework looks for referenced DLLs in several locations Global assembly cache (GAC) Any private paths added to the AppDomain The current directory of the executing assembly What order are those locations searched? Is the search for a DLL ceased if a match is found or does it continue through all locations (and i...

How to add a dll to gac in vista

When I drag & drop a dll to the assembly folder on vista, I get the error "Access is denied: mydll.dll". How can I bypass the error message and add my dll to gac? ...

What is the difference between dllexport and dllimport?

I'm just looking for a simple, concise explanation of the difference between these two. MSDN doesn't go into a hell of a lot of detail here. ...

Loading different versions of the same assembly

Using reflection, I need to load 2 different versions of the same assembly. Can I load the 2 versions in 2 different AppDomains in the same process? I need to do some data migration from the old version of the app to the new version. Please let me know if this is possible or should I use 2 separate processes. ...

Is it possible to embed and use a portable executable in a .net DLL?

The easiest way to think of my question is to think of a single, simple unix command (albeit, this is for windows) and I need progmatic access to run it. I have a single command-line based executable that performs some unit of work. I want to call that executable with the .net process library, as I can do with any other executable. Ho...

Loading Assemblies from the Network

This is related to the this question and the answer maybe the same but I'll ask anyways. I understand that we can start managed executables from the network from .NET 3.5 SP1 but what about assemblies loaded from inside the executable? Does the same thing apply? ...

What is the best tool to find which DLL another VB6 DLL is referenced to?

This is an antique problem with VB6 DLL and COM objects but I still face it day to day. What is the best tool to see which DLL file or version another DLL is referencing to? Of course, this is from the OS point of view - compiled DLLs not from within VB6 IDE. It's DLL hell. ...

Is it bad to load many managed DLL's without using any types in them?

Background: At my company we are developing a bunch applications that are using the same core dll's. These dll's are using Spring.net's IoC-container to wire things up (auto-wiring). All applications are using the same spring configuration file, and this configuration file points to many classes in many different dll's. But not all appli...

How can a C++ windows dll be merged into a C# application exe?

I have a Windows C# program that uses a C++ dll for data i/o. My goal is to deploy the application as a single EXE. What are the steps to create such an executable? ...