Search order of DLLs

M

mphanke

Hi,

I have a question concerning the search order of DLLs and whether I can
take influence on how they are loaded.

The following is my situation:

I have a plugin design for my application. It is stand alone if compiled
as exe, a plugin if compiled as dll.

If compuled as plugin I would like to install the application to a path
like x:\somewhere\HostApp\Plugins\PlugIn1. So far no problem, but if I
load the plug1.dll it has dependencies, which are not found in the
HostApp directory, and not somewhere else on the system, because they
are in .\Plugins\PlugIn1. Is there a way I can change that
programmatically?

Any solution is apreciated,

Martin
 
G

Gary Chang

Hi Martin,

If your plugin loads its dependent dll explicitly, how about use the
GetModileFileName(...) to get the plugin's directory, when handling the
DLL_PROCESS_ATTACH event within the DllMain function?


Thanks!

Best regards,

Gary Chang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top