"Dmitry Timoshkov" <[EMAIL PROTECTED]> writes:
> I completely don't understand the purpose of genericDriver.
> Why return something bogus to application if the requested
> driver was not found? PageMaker tries to load driver, for which
> publication was "composed", say "AGFA ProSet 9400", but I have no
> driver with a such name, I have "Acrobat Distiller" instead.
> If the requested driver was not found, PageMake just says, that it
> can not load driver and continues, but with that "generic" I have
> a crash.
The idea is that the driver is first searched in the internal list,
and if not found we fall back to loading a Win16 driver. This is done
by having DRIVER_FindDriver return the generic driver, which allows
CreateDC to continue and call the driver-specific DC creation routine,
in this case WIN16DRV_CreateDC. This will in turn attempt to load the
16-bit driver; if this fail, WIN16DRV_CreateDC will return an error
which will cause CreateDC to fail.
If it is crashing for you, it may be that we don't handle the CreateDC
failure correctly; but disabling the generic driver mechanism is a bit
too drastic...
> On the related note:
> 1. Why the drivers are registered by an external call
> to DRIVER_RegisterDriver, but not an internal function via GetProcAddress
> and a such? For instance if CreateDC("mydriver.drv") is called, retrieve
> all needed for a DC creation exported functions via GetProcAddress, and
> then call DRIVER_RegisterDriver with that data?
Because we do not want to implement a full Win16 interface for the
internal drivers.
> 2. Everywhere in Wine "Wine PostScript Driver" is referred as WINEPS.DLL,
> but in wine/documentation/psdrv.reg it is WINEPS.DRV. If you will specify
> "[devices] Wine PostScript Driver=WINEPS.DRV,FILE:" driver loading will fail,
> even if I fixed LoadPrinterDriver in wine/graphics/win16drv/prtdrv.c to not
> add ".DRV" if extension already exist.
Maybe the internal Postscript driver should register itself under
WINEPS.DRV in addition to WINEPS.
--
Alexandre Julliard
[EMAIL PROTECTED]