Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Indirect DLL loading conflict


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 Nyarlath   Members   -  Reputation: 104

Like
0Likes
Like

Posted 24 August 2012 - 06:39 AM

Dear all,
I am developing an application A which links to third party libraries B (B1.lib and B1.dll) and C (C.lib, C.dll and B2.dll). B1 and B2 are different versions of the same library and export functions with the same names.
The project compiles, links and starts, but I get runtime errors when I call functions declared in C. If I replace B1.dll with a copy of B2.dll (to verify that the wrong dll is being used), the calls of C are working, but obviously I get into trouble when I call functions of B1 directly.

Why is C using B1 when it has been compiled linking to B2? Is there a way to force C to call the functions of B2 instead of B1?

Many thanks

Sponsor:

#2 SiCrane   Moderators   -  Reputation: 9661

Like
2Likes
Like

Posted 24 August 2012 - 07:24 AM

Do B1.dll and B2.dll share the same file name?

#3 Nyarlath   Members   -  Reputation: 104

Like
0Likes
Like

Posted 24 August 2012 - 07:38 AM

Do B1.dll and B2.dll share the same file name?

No, they could not even, because they have to be located in the same folder as the application. If B2 is missing, the application refuse to start.
(This is puzzling me because renaming the libs was the panacea of dll problems.)

#4 BitMaster   Crossbones+   -  Reputation: 4421

Like
1Likes
Like

Posted 24 August 2012 - 07:50 AM

Am I right when I suspect that when calling something in C you hand it something you created directly through B1?

#5 Nyarlath   Members   -  Reputation: 104

Like
0Likes
Like

Posted 24 August 2012 - 08:54 AM

Am I right when I suspect that when calling something in C you hand it something you created directly through B1?

No, they are called from unrelated code.

Looking at the modules loaded I have verified that both of the libraries are loaded, so I am now convinced that it is not a library loading problem, but a conflict between the two versions running in parallel. This is possible if they share some resources somewhere.

Many thanks for your interest.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS