winspool: Don't use 16Bit gdi.exe function for DeviceCapabilitiesA/W

Alexandre Julliard julliard at winehq.org
Mon Nov 23 08:28:51 CST 2009


Detlef Riekenberg <wine.dev at web.de> writes:

> -    if (!GDI_CallDeviceCapabilities16)
> -    {
> -        GDI_CallDeviceCapabilities16 = (void*)GetProcAddress( GetModuleHandleA("gdi32"),
> -                                                              (LPCSTR)104 );
> -        if (!GDI_CallDeviceCapabilities16) return -1;
> -    }
> -    ret = GDI_CallDeviceCapabilities16(pDevice, pPort, cap, pOutput, lpdm);
> -
> -    /* If DC_PAPERSIZE map POINT16s to POINTs */
> -    if(ret != -1 && cap == DC_PAPERSIZE && pOutput) {
> -        POINT16 *tmp = HeapAlloc( GetProcessHeap(), 0, ret * sizeof(POINT16) );
> -        POINT *pt = (POINT *)pOutput;

You can't remove the 16-bit conversion if you are still calling the
existing driver. Probably a better approach is to first add a
DrvDeviceCapabilities to the wineps driver.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list