Alexandre Julliard julliard@winehq.org wrote:
Hans Leidekker hans@it.vu.nl writes:
Filip's patch was not quite right, these functions need to be
exported
ordinal *only*, otherwise the resulting test binary won't link at runtime on systems older than xp. With the patch below I am able to produce binaries that run on xp as well as 2k and 98.
And actually the same thing should be done in the Wine spec file (in
fact most of
the shell32 functions should probably be marked noname).
I think "most" is in this case quite overexagerating. There certainly are quite some functions which should be always imported by ordinal, as they were exported that way before they were documented by MS, but a lot of the rest of shell32 is simply exported by name only.
Thinking a little about this I think exporting the ordinals by name too is not a problem at all, as long as the import libraries which get generated from the .spec file or .def file import all APIs with a defined ordinal through their ordinal instead. This way the DLLs are forgiving about someone trying to import by name and the newest Windows versions seem to allow linking to those functions by name too, but the import libraries will also work on older systems where the functions Are exported as ordinals only.
This may require a modification to the import library generation to make sure that for defined ordinals the apropriate code to import that function by ordinal is Generated, instead of prefering import by name if both are present.
Rolf Kalbermatter
Rolf Kalbermatter rolf.kalbermatter@citeng.com writes:
Thinking a little about this I think exporting the ordinals by name too is not a problem at all, as long as the import libraries which get generated from the .spec file or .def file import all APIs with a defined ordinal through their ordinal instead. This way the DLLs are forgiving about someone trying to import by name and the newest Windows versions seem to allow linking to those functions by name too, but the import libraries will also work on older systems where the functions Are exported as ordinals only.
This may require a modification to the import library generation to make sure that for defined ordinals the apropriate code to import that function by ordinal is Generated, instead of prefering import by name if both are present.
This is precisely what -noname does.