DLLCall calling function from wrong dll

Xbase++ 2.0 Build 554 or later
Post Reply
Message
Author
pauld
Posts: 15
Joined: Thu Jul 31, 2014 2:48 pm

DLLCall calling function from wrong dll

#1 Post by pauld »

So here's the issue we're seeing:

We have 3 dll’s (let’s call them dll1, dll2, dll3) which all have a function with the same name (let’s call it dllfunction). The issue we’re running into is that we are trying to call dllfunction from dll2 using dllcall(). However, the dll function that is actually being called is the one from dll1.

When we rename the function in dll1 (to, say, dllfunction1) and then use dllcall() to call dllfunction from dll2 it works as expected.

However, if we change the function in dll 2 (to, say, dllfunction2) and then use dllcall() to call dllfunction from dll2 a runtime error comes up saying that no function named dllfunction exists in dll2. It’s not looking for dllfunction in dll3 (like it did with dll1).

The question is, when we call dllcall(dll2_handle, dllfunction) why is it using the dllfunction found in dll1?

It should also be noted that dll2 is the only dll that is loaded using dllLoad. The other dll’s are either not loaded at all or are unloaded prior to dll2 being loaded.

pauld
Posts: 15
Joined: Thu Jul 31, 2014 2:48 pm

Re: DLLCall calling function from wrong dll

#2 Post by pauld »

Sorry. This should be under xbase++ support.

User avatar
rdonnay
Site Admin
Posts: 4775
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DLLCall calling function from wrong dll

#3 Post by rdonnay »

Are these Xbase++ dlls?
The eXpress train is coming - and it has more cars.

Post Reply