locating a DLL for an app

bwells

Regular
Joined
Feb 25, 2003
Messages
84
I have an unmanaged DLL that a unmanaged application needs when it runs. Inside VS .NET, I have a soluction and in the solution are a project for the dll and for the application. How can I provide the DLL to the application at runtime? I tried adding the DLL to the application project, but this did not work. They only way I know how is to copy the DLL to the run directory with the application.

There must be a better way that is more like working with managed appilcations. I want my deployment wizard to know that the DLL in my solution is part of my distribution as well.
 
Are you saying that you want to tell the program to include the dll and use function from it?
 
I just want the DLL to be visible to my program when I run the program, from within visual studio. Eventually when I distribute an application, I will include the DLL in the application directory. But in VS, I have two projects, one with the DLL (in its own directory), and the other with an application in a different directory. When I have managed projects, I simply add a reference of one project to another, and VS takes care of finding all the DLLS and copying them locally and keeping them in sync. But with an unmanaged C DLL, and an unmanaged C++ application, I have to deal with the DLLs manually. At least that is the only way I know how to do it.
 
There is no better solution than moving your DLL to the application directory (or the System directory, but you probably don't want that either). Standard DLLs are not referenced in any way, they are located purely on filename.
 
Back
Top