WinSpool Ordinal Addition

Mark G. Adams mgadams at
Thu Jan 10 21:53:43 CST 2002

On January 7, 2002 01:39 pm, Alexandre Julliard wrote:
> "Mark G. Adams" <mgadams at> 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 


More information about the wine-devel mailing list