"Mark G. Adams" mgadams@sympatico.ca writes:
In Windows 2000 (and I presume later), winspool.drv has some new functions. The one this application is looking for turns out to be GetDefaultPrinter() (ASCII version is ordinal 201, Unicode is 203). I've added the ASCII and Unicode implementations of that function to winspool in the attached patch. The ASCII version has been tested; I'd appreciate it if you could take a glance at the Unicode version and see if I got the conversions correct.
The application will now open the 'printer setup' dialog, instead of returning an error.
Exactly what error did you get before? And are you sure this is really an ordinal import? This seems the kind of things that Win95 does, but not so much Win2000.
On January 7, 2002 01:39 pm, Alexandre Julliard wrote:
"Mark G. Adams" mgadams@sympatico.ca writes:
In Windows 2000 (and I presume later), winspool.drv has some new functions. The one this application is looking for turns out to be GetDefaultPrinter() (ASCII version is ordinal 201, Unicode is 203). I've added the ASCII and Unicode implementations of that function to winspool in the attached patch. The ASCII version has been tested; I'd appreciate it if you could take a glance at the Unicode version and see if I got the conversions correct.
The application will now open the 'printer setup' dialog, instead of returning an error.
Exactly what error did you get before? And are you sure this is really an ordinal import? This seems the kind of things that Win95 does, but not so much Win2000.
Here's the message output on startup if those functions are not exported at the expected ordinals:
err:win32:PE_fixup_imports No implementation for WINSPOOL.DRV.201 imported from C:\OmniMark\EnterpriseStudio6_1_1\OmniMark-Enterprise-Studio.exe, setting to 0xdeadbeef
Unless i'm mistaken, that's an ordinal import.
Now it turns out that that function's presence doesn't appear to be essential; printer setup wasn't working in the first place as I didn't have wine printing properly configured. However, the SourceView ActiveX control, which OmniMark uses for editing and printing, must be checking for its presence and presumably making use of it for something if it exists.
I guess the patch could be dealt with in two chunks:
1) everything except ordinals. This just adds new functionality which is present in W2K (and WinXP presumably) and doesn't break anything.
2) the specific ordinals for those functions. While I agree that this is a pretty poor way to test for a function's presence, I don't see what harm there would be in assigning the expected ordinals to those functions, and there is at least one application which makes use of that. The only possibility for concern would be if it turned out that WinXP has different ordinals for them; I'm afraid I don't have access to a WinXP machine to test that.
//Mark
"Mark G. Adams" mgadams@sympatico.ca wrote:
Here's the message output on startup if those functions are not exported at the expected ordinals:
err:win32:PE_fixup_imports No implementation for WINSPOOL.DRV.201 imported from C:\OmniMark\EnterpriseStudio6_1_1\OmniMark-Enterprise-Studio.exe, setting to 0xdeadbeef
Unless i'm mistaken, that's an ordinal import.
This application will not work either under win9x or win2000 because they have different functions assigned to ordinal 201: win95 OSR2 PE and win98 SE: StartDocPrinterA win2000: GetDefaultPrinterA
It should be clear even for you, since you have submitted two different patches with ordinal 201 assigned to absolutely different functions and presumably both variants have worked for you. Apparently just adding 100 stub OrdinalBase should work for you too.
Probably the right fix would be to add new parameter to the wine .spec files: "ordinal base", because for WINSPOOL.DRV it's equal to 100 in all variants of that DLL for me.
On January 11, 2002 12:21 am, Dmitry Timoshkov wrote:
This application will not work either under win9x or win2000 because they have different functions assigned to ordinal 201: win95 OSR2 PE and win98 SE: StartDocPrinterA win2000: GetDefaultPrinterA
Interesting. At any rate, I'll pass this info along to see if it can be determined WTF SourceView's trying to do here.
It should be clear even for you, since you have submitted two different patches with ordinal 201 assigned to absolutely different functions and presumably both variants have worked for you. Apparently just adding 100 stub OrdinalBase should work for you too.
The fact that it worked with different functions there did surprise me. My assumption (not having a good idea on how ordinal importing works) was that, at this point, it's just checking for the presence of a function but not executing it. Very little of the application works under WINE, so I'm not able to actually test out printing currently.
Given the above, I agree there's no point in assigning ordinals to those two functions.
Thanks for the additional info. At a minimum, it's highlighted a possible printing problem we'll have to look in to.
//Mark
"Mark G. Adams" mgadams@sympatico.ca wrote:
The fact that it worked with different functions there did surprise me. My assumption (not having a good idea on how ordinal importing works) was that, at this point, it's just checking for the presence of a function but not executing it. Very little of the application works under WINE, so I'm not able to actually test out printing currently.
Given the above, I agree there's no point in assigning ordinals to those two functions.
Could you please test the attached patch which implements the ordinal base functionality in winebuild and sets ordinal base 100 for WINSPOOL.DRV?
On January 11, 2002 01:23 am, Dmitry Timoshkov wrote:
"Mark G. Adams" mgadams@sympatico.ca wrote:
The fact that it worked with different functions there did surprise me. My assumption (not having a good idea on how ordinal importing works) was that, at this point, it's just checking for the presence of a function but not executing it. Very little of the application works under WINE, so I'm not able to actually test out printing currently.
Given the above, I agree there's no point in assigning ordinals to those two functions.
Could you please test the attached patch which implements the ordinal base functionality in winebuild and sets ordinal base 100 for WINSPOOL.DRV?
Thanks, the patch does quiet the error message seen at startup. However, as stated above, I can't actually test out printing since very little works currently.
//Mark
"Dmitry Timoshkov" dmitry@baikal.ru writes:
It should be clear even for you, since you have submitted two different patches with ordinal 201 assigned to absolutely different functions and presumably both variants have worked for you. Apparently just adding 100 stub OrdinalBase should work for you too.
Probably the right fix would be to add new parameter to the wine .spec files: "ordinal base", because for WINSPOOL.DRV it's equal to 100 in all variants of that DLL for me.
No, the right fix is the first one, adding a function at ordinal 100, since there is one under Windows. It should never be necessary to specify the ordinal base explicitly.