×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Mar 2003
    Location
    Berlin
    Posts
    7

    Loading of DLLs from other drives than main application is installed.

    Hi!

    I have one application installed for example to C drive and that application loading polymorphic dll from E drive by RLibrary Load function. But by problem is that DLL doesn't work in main application if it's installed to different drive than main appl.
    I tried also to copy DLL from other drive to the same drive than my main application is installed and load it to RLibrary after that from same drive but main application cannot open that DLL.
    Is it possible to make that way or is there now some problems with DLL's export table because its originally installed to different drive than main application?

    Could someone help?

    Thanks advance for help!

  2. #2
    Nokia Developer Expert
    Join Date
    Apr 2003
    Location
    Finland
    Posts
    425
    Hi,

    If there is (inside dll) a code like this:
    _LIT( KSome1, "\\system\\libs\\greatelib\\some.txt");
    _LIT( KSome2, "\\system\\apps\\xxx\\some.txt");
    _LIT( KSome3, "c:\\system\\apps\\xxx\\some.txt");
    etc etc.
    it will cause or may cause troubles.

    When you copy that library to some other place it should be:
    <drive>:\system\libs
    or in the same folder where your application binary is.

    BTW: why to use RLibrary::Load, why you just don't link usual way ?

    There should not be any problem to locate dll to other drive, if there is not that kind of bad code. My suggestion is to put library dll files to system/libs folder and link as usual...if there is no other good reason to do some trick.

    Br V

  3. #3
    Registered User
    Join Date
    Mar 2003
    Location
    Berlin
    Posts
    7

    question

    Hi!

    I have (inside dll) many a code like next:

    _LIT( KSome1, "\\system\\libs\\greatelib\\some.txt");
    _LIT( KSome2, "\\system\\apps\\xxx\\some.txt");
    _LIT( KSome3, "c:\\system\\apps\\xxx\\some.txt");

    What is problem in that code, is it that path \\system\\apps\\ or
    \\system\\libs\\?
    If I change my paths so that there is no that system\\xxx. For example so that "c:\\MyApplication\\xxx.

    If I don't install my application to system folder, is it solution for my problem?

    Br AK

  4. #4
    Registered User
    Join Date
    Mar 2003
    Location
    Berlin
    Posts
    7
    Hi!

    I tried to install DLL application to different folder "C:\\MyApplication\\xxx." instead of system folder, but it didn't help.
    So it's true that if DLL include path literals it doesn't work if DLL is loaded from other drive by RLibrary::Load function.
    Now I should try to link as usual way.

    Thanks for the advice.

    Arto

Posting Permissions

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