Results 1 to 5 of 5

Thread: UseDll with C++ run-time DLLs

  1. #1
    Join Date
    May 2003
    Location
    Germany
    Posts
    76

    UseDll with C++ run-time DLLs

    For checking the license key, I need to call a function from a product DLL which needs the Visual C++ Run-time MSVCP60.DLL, which in turn needs the C Run-time MSVCRT.DLL.

    All those DLLs will be present in the correct versions after the installation; however, in order to use them during the setup, I add them to the "Setup files" list in the IDE and call UseDll from Installscript in what I think the correct order:

    UseDll(SUPPORTDIR^"msvcrt.dll");
    UseDll(SUPPORTDIR^"msvcp60.dll");
    UseDll(SUPPORTDIR^"Mydll.dll");

    However, Setup complains that msvcp60.dll could not be loaded and exits then.

    All those DLLs are present in the SUPPORTDIR; the Dependency Walker does not show any missing functions.

    Thanks for any ideas

    Matthias

  2. #2
    Join Date
    Oct 2001
    Location
    Here and there
    Posts
    16,233
    Perhaps try calling ChangeDirectory(SUPPORTDIR) before calling UseDLL?
    Robert Dickau - This and That - Flexera Software

    Want help? See Windows Installer white papers, training courses, newsletters, HelpNet, forum search, Knowledge Base, ...
    Want more help?
    See our InstallTalk blog.
    Want even more help? See our relatively new Advanced Windows Installer (MSI) training course.

  3. #3
    Join Date
    May 2003
    Location
    Germany
    Posts
    76
    Thanks for your input, Robert.

    However, it doesn't work. I have added a ChangeDirectory(SUPPORTDIR) before the LoadDll calls, but LoadDll(SUPPORTDIR^"msvcp60.dll") still returns a -1.

    Regards,

    Matthias

  4. #4
    Join Date
    Oct 2001
    Location
    Here and there
    Posts
    16,233
    Does Is(FILE_EXISTS, SUPPORTDIR ^ "lib.dll") return true?

  5. #5
    Join Date
    May 2003
    Location
    Germany
    Posts
    76
    Is(FILE_EXISTS,SUPPORTDIR^"lib.dll") returns true for all DLLs I try to use.

    However, UseDll only works for msvcrt.dll and reutrns -1 for msvcp60.dll.

    Regards

    Matthias

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •