Vasya Pupkin <
XXXX@XXXXX.COM >schreef in berichtnieuws
XXXX@XXXXX.COM ...
Quote
Hi Rudy,
Hello Vasya,
Quote
[...]
>>I do tell you ;-) Tlink32 takes it from your .LIB file.
>If that's so, should not *all* DLL-functions get imported
>by Ordinal, and not just one here-and-there ?
The method of importing is separately specified for each function.
>I'm not sure what I'm looking for, so I took two functions
>outof the same program. One that does keep it's name
>(DestroyWindow), and one that changes to an Ordinal-
>imported one (PathFindExtensionA)
[...]
>Imported by: ordinal
[...]
>Imported by: ordinal
[...]
>Nothing strange that I can see.
1. You seem to have the library created without "-f" option.
I've not sat still today, and have sought & tried quite a few things to see
if I could explain what was happening. You're right, I created my LIB-files
without the "-f" option, as well as without the "-c" option (case
sensitivity). I just took it for granted that "import by name" would be the
default (did not really know anything about ordinals at the time :-)
Quote
2. Your linker may work incorrectly. I've just tried mine in
similar situation but couldn't get such results.
Something I did not think of (until this afternoon, after regarding the
results of more experimenting) is that I use the standard "import.lib" (as
provided by the Tasm 5 package), as well as libraries I created myself
(using IMPLIB). I'ts just possible that TLink uses, in reaction to the "/o"
switch, the "best fit" if both "by Name" and "by Ordinal" versions are
available. But I'm not really sure about it yet.
Quote
>I have absolutily *no clue* to why the first get's imported by Ordinal,
>and the second by it's name. Any suggestions ?
1. Use a _normal_ library (e.g. import32.lib). Or recreate yours
with "implib -f ..."
What do you call "normal" ? One of the tests I did was trying to use the
StrStrIA function. I took a clean, very basic skeleton program for it, and
it only contained a reference to the Import32.Lib. Assembling & linking
went quite allright, so the function-name was present in the .Lib-file. But
when I tried to execute the program a window popped up complaining that the
function could not be found :-\ I checked Import32.Lib, and the
function-name was there alright, imported by name, and linked to
Kernel32.dll !. I than checked the Kernel32.dll, and could not find the
function-name *at all*
I just did convert the libraries to inport "by Name" this afternoon :-)
Quote
2. Throw your linker away (and take version 2.5)
I will first experiment/test some more, as it is good possible I just get
confused because I just do not recognise what is happening ...
Thanks for your help.
Regards,
Rudy Wieser