When I look into dependencies IS is trying to load dll B from c:\winnt\system32? Why????
Error loading DLL
Posted 17 January 2002 - 02:15
Posted 17 January 2002 - 03:28
(Edited by TacoBell00 at 9:29 pm on Jan. 16, 2002)
Posted 18 January 2002 - 17:14
HTH
Kathy
Posted 18 January 2002 - 18:02
1. In the "current directory"
2.In the standard system areas
3. on the PATH environment
To make sure your install works without depending on the PATH, and for a DLL that is not in WINSYSDIR, do one of the following:
1. Use ChangeDirectory() to make the current working directory the same as where the shared DLL lives. i.e.: ChangeDirectory(SUPPORTDIR).
2. Load the DLL in the right order. That is, if you have A.dll that depends on B.DLL, then you would:
UseDLL("B.DLL");
UseDLL("A.DLL");
[...]
UnuseDLL("A.DLL");
UnuseDLL("B.DLL");
If you have further need of exported function calls, you would call that DLL first, and so on.
Both methods work for me, but (1) seems more robust. Having the CWD set to SUPPORTDIR does not seem to affect the install's cleanup at the end of the process.