Can i use 2 dll with same name ?
I have a dll that is written i think in delphi
i have two versions
version 1 has a bug
version 2 has the bug fixed but has a different bug
between the two of them we have all the working code i need
can i use them both ? i have tried to rename the second one and link to it for some of the functions - but am getting strange results
can it be done ?
Given your strange results the answer would appear to be no.
I do not want to be dogmatic here because there are probably factors involved beyond
my personal knowledge; but I believe the following is a generally true explanation:
If the DLL is stateless then you should be able to do what you are attempting.
However, if the DLL maintains any sort of internal state then you are going to get
strange results at best and "glorious" crashes at worst.
thanks for the reply
what does stateless mean ?
is a delphi dll a true dll or an activex/ocx ?
A Delphi DLL is a DLL.
An ActiveX or ocx is a special DLL (and can also be created in Delphi).
Stateless means that the DLL has no internal state.
OK. I know that might seem circular so let me explain more.
In your simple situation, it means that every call you make to the DLL is entirely self
contained and has no dependencies on any calls that have preceded it or on any code
that might have run when the DLL was first loaded.
Let us assume a document scanning DLL called scan.dll.
To scan you might have to make two calls:
Obviously, if you loaded a second copy of scan.dll (renamed to scan2.dll) and sent
LoadThisScanner('CANON'); to scan.dll and
Scan; to scan2.dll you will be in trouble.
That is one explanation of having state.
thanks for the explanation - it makes sense
i suspect you are correct
i will make multiple exe's where i swap over one function at a time and observe the results