Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Custom Action Loading DLL from SUPPORTDIR


1 reply to this topic

JoeM

JoeM
  • Full Members
  • 3 posts

Posted 26 January 2007 - 16:22

Hi,

I have an old dll that that has functions to validate serial keys (say checkLic.dll)and get licence details. I am trying to load this dll in to a C++ custom action dll (say CA.dll).

I am using installshield 12 to make my basic MSI project. I have put the checkLic.dll in the support files folder and use MsiGetProperty(hInstall, TEXT("SUPPORTDIR"),TEXT(""), &cchValBuf) to find the directory to load the dll in. However, the call to load to LoadLibrary fails.

I was wondering when the support files are actually loaded onto the target system, it says at the start of installation ,but does mean at the start of the execute phase, or of the whole of the installation process (ie before the user interface)?

Im trying to call thedll in the UISequence, using it to select which features I am going to install based on the serial.

Any ideas on why it won't load?

Many Thanks



Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 26 January 2007 - 17:34

Double check the value you get from reading SUPPORTDIR, e.g. by inserting a MessageBox in your DLL. At the time the box displays check if the other file is in the location it should be.
Also did you check the error code from LoadLibrary? Maybe it's missing some other file, like C runtime? Make sure you don't rely on the "current working directory" as this will typically not be the directory where your msi file is or the supportfir but instead the system32 folder.