View | Details | Raw Unified | Return to bug 12369
Collapse All | Expand All

(-)wine-20051107/dlls/gdi32/printdrv.c.orig (-12 / +20 lines)
Lines 457-475 Link Here
457
457
458
    /* TTD convert the 'output device' into a spool file name */
458
    /* TTD convert the 'output device' into a spool file name */
459
459
460
    if (pszOutput == NULL || *pszOutput == '\0')
460
    if ( pszOutput && *pszOutput)
461
      return -1;
461
    {
462
462
        psCmd[0] = 0;
463
    psCmd[0] = 0;
463
        /* @@ Wine registry key: HKCU\Software\Wine\Printing\Spooler */
464
    /* @@ Wine registry key: HKCU\Software\Wine\Printing\Spooler */
464
        if(!RegOpenKeyA(HKEY_CURRENT_USER, "Software\\Wine\\Printing\\Spooler", &hkey))
465
    if(!RegOpenKeyA(HKEY_CURRENT_USER, "Software\\Wine\\Printing\\Spooler", &hkey))
465
        {
466
    {
466
            DWORD type, count = sizeof(psCmd);
467
        DWORD type, count = sizeof(psCmd);
467
            RegQueryValueExA(hkey, pszOutput, 0, &type, (LPBYTE)psCmd, &count);
468
        RegQueryValueExA(hkey, pszOutput, 0, &type, (LPBYTE)psCmd, &count);
468
            RegCloseKey(hkey);
469
        RegCloseKey(hkey);
469
        }
470
        if (!psCmd[0] && !strncmp("LPR:",pszOutput,4))
471
            sprintf(psCmd,"|lpr -P%s",pszOutput+4);
472
    }
473
    else
474
    {
475
#ifdef HAVE_FORK
476
        strcpy( psCmd,"|lpr");
477
#else
478
        return -1;
479
#endif
470
    }
480
    }
471
    if (!psCmd[0] && !strncmp("LPR:",pszOutput,4))
472
        sprintf(psCmd,"|lpr -P%s",pszOutput+4);
473
481
474
    TRACE("Got printerSpoolCommand '%s' for output device '%s'\n",
482
    TRACE("Got printerSpoolCommand '%s' for output device '%s'\n",
475
	  psCmd, pszOutput);
483
	  psCmd, pszOutput);

Return to bug 12369