Hi,
I'm having problems calling a function from a dll. I wrote a dll that brings up a dialog box that allows the user to select which Palm user they would like to install my Palm extensions to. It works perfectly when I run it from rundll32.exe (It's how i test my functions that are in dlls). When I put it into an installer and run it fails to load with a return value of DLLLOADFAILED. I tracked it down to the fact that my dll can not load functions from another dll. Both dlls are in the $SUPPORTDIR$.
I'm guessing my problem is that the support dir is not the current working directory when I'm calling my dll so it can't find the other dll (Instaide.dll for any palm developers out there.)
Any ideas how I can fix it?
Problems with Call DLL function
I found a solution to my problem. It's not pretty but it seems to work.
I called SetDllDirectory ( http://msdn.microsoft.com/en-us/library ... S.85).aspx )from my installer right before I call my own dll and pass it $SUPPORTDIR$.
What I should have done if I had the time was use LoadLibrary and GetProcAddress instead of linking against instaide.lib. That way I could call SetDllDirectory from within my dll. *shrugs* but it works.
I called SetDllDirectory ( http://msdn.microsoft.com/en-us/library ... S.85).aspx )from my installer right before I call my own dll and pass it $SUPPORTDIR$.
What I should have done if I had the time was use LoadLibrary and GetProcAddress instead of linking against instaide.lib. That way I could call SetDllDirectory from within my dll. *shrugs* but it works.

