Commit dc8d7e7d authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

winspool.drv: There is no need to speculate about wineps.drv default DEVMODE.

parent ac79a3f9
......@@ -3986,63 +3986,20 @@ static BOOL WINSPOOL_GetStringFromReg(HKEY hkey, LPCWSTR ValueName, LPBYTE ptr,
* WINSPOOL_GetDefaultDevMode
*
* Get a default DevMode values for wineps.
* FIXME - use ppd.
*/
static void WINSPOOL_GetDefaultDevMode(
LPBYTE ptr,
DWORD buflen, DWORD *needed)
{
DEVMODEW dm;
static const WCHAR szWwps[] = {'w', 'i', 'n', 'e', 'p', 's', '.', 'd', 'r', 'v', 0 };
/* fill default DEVMODE - should be read from ppd... */
ZeroMemory( &dm, sizeof(dm) );
memcpy(dm.dmDeviceName,szWwps,sizeof szWwps);
dm.dmSpecVersion = DM_SPECVERSION;
dm.dmDriverVersion = 1;
dm.dmSize = sizeof(DEVMODEW);
dm.dmDriverExtra = 0;
dm.dmFields =
DM_ORIENTATION | DM_PAPERSIZE |
DM_PAPERLENGTH | DM_PAPERWIDTH |
DM_SCALE |
DM_COPIES |
DM_DEFAULTSOURCE | DM_PRINTQUALITY |
DM_YRESOLUTION | DM_TTOPTION;
dm.u1.s1.dmOrientation = DMORIENT_PORTRAIT;
dm.u1.s1.dmPaperSize = DMPAPER_A4;
dm.u1.s1.dmPaperLength = 2970;
dm.u1.s1.dmPaperWidth = 2100;
dm.u1.s1.dmScale = 100;
dm.u1.s1.dmCopies = 1;
dm.u1.s1.dmDefaultSource = DMBIN_AUTO;
dm.u1.s1.dmPrintQuality = DMRES_MEDIUM;
/* dm.dmColor */
/* dm.dmDuplex */
dm.dmYResolution = 300; /* 300dpi */
dm.dmTTOption = DMTT_BITMAP;
/* dm.dmCollate */
/* dm.dmFormName */
/* dm.dmLogPixels */
/* dm.dmBitsPerPel */
/* dm.dmPelsWidth */
/* dm.dmPelsHeight */
/* dm.u2.dmDisplayFlags */
/* dm.dmDisplayFrequency */
/* dm.dmICMMethod */
/* dm.dmICMIntent */
/* dm.dmMediaType */
/* dm.dmDitherType */
/* dm.dmReserved1 */
/* dm.dmReserved2 */
/* dm.dmPanningWidth */
/* dm.dmPanningHeight */
if(buflen >= sizeof(DEVMODEW))
memcpy(ptr, &dm, sizeof(DEVMODEW));
*/
static void WINSPOOL_GetDefaultDevMode(LPBYTE ptr, DWORD buflen, DWORD *needed)
{
static const WCHAR winepsW[] = { 'w','i','n','e','p','s','.','d','r','v',0 };
if (buflen >= sizeof(DEVMODEW))
{
DEVMODEW *dm = (DEVMODEW *)ptr;
/* the driver will update registry with real values */
memset(dm, 0, sizeof(*dm));
dm->dmSize = sizeof(*dm);
lstrcpyW(dm->dmDeviceName, winepsW);
}
*needed = sizeof(DEVMODEW);
}
......
......@@ -2989,7 +2989,7 @@ todo_wine
START_TEST(info)
{
hwinspool = GetModuleHandleA("winspool.drv");
hwinspool = LoadLibrary("winspool.drv");
pAddPortExA = (void *) GetProcAddress(hwinspool, "AddPortExA");
pEnumPrinterDriversW = (void *) GetProcAddress(hwinspool, "EnumPrinterDriversW");
pGetDefaultPrinterA = (void *) GetProcAddress(hwinspool, "GetDefaultPrinterA");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment