CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2003
    Location
    M...N
    Posts
    220

    Load different DLL with the same name

    Well, it's very funny, but I would like to make things clear by the gurus' help here.

    We are running a test program with two different versions. One (says A) is supposed to be quicker than another one (says B).

    It's actually the same application just with improvement, so we can know that all architecture are the same in this case.

    This application will load an Engine.dll, which is exactly the same place that gets improvement.

    Here comes the problem.

    While we run A directly, then it's very quick as we expect.

    When we run B in the first step, it's much slower then. However, if we terminate the B, and then run A, then A is very slow also.

    The way we do testing is put the two versions under two different folders, like FolderA and FolderB.

    The only way we can think of that cause this problem is the slower DLL is still in the memory although we did terminate B.

    From the basic concept of DLL, we know that DLL will no longer in memory if no application is still running it. However, in our testing, it seems it will still be in memory?

    The Engine.dll is under FolderA and FolderB, not in any system folder.

    And we are testing in in a portable WinCE/mobile device.

  2. #2
    Join Date
    Sep 2003
    Location
    M...N
    Posts
    220

    Re: Load different DLL with the same name

    Bump it for any possible help and say happy 2008 yr to everyone.

  3. #3
    Join Date
    Aug 2002
    Location
    India
    Posts
    97

    Lightbulb Re: Load different DLL with the same name

    Hi,
    Few clarification for your question. When you ran the DLL B, during termination its freeing the allocated memory and resources. Else it is still in memory which makes slows down your DLL A?

    Abhilash

  4. #4
    Join Date
    Sep 2003
    Location
    M...N
    Posts
    220

    Re: Load different DLL with the same name

    m... from the "theory" of DLL lifetime, DLL B should be removed from the memory and then DLL A won't get any effected.

    But from the experiment, it seems not exactly like this way. No idea whether Windows has some cache mechanism, that will reuse the "cache?" memory or not?

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured