Do not hold the GDI lock while 16-bit ExtDeviceMode is called.

This commit is contained in:
Dmitry Timoshkov 2001-09-14 01:00:57 +00:00 committed by Alexandre Julliard
parent b56a2ef780
commit 123d266965
1 changed files with 5 additions and 3 deletions

View File

@ -378,6 +378,7 @@ INT WINAPI GDI_CallExtDeviceMode16( HWND hwnd,
HDC hdc; HDC hdc;
DC *dc; DC *dc;
INT ret = -1; INT ret = -1;
INT (*pExtDeviceMode)(LPSTR,HWND,LPDEVMODEA,LPSTR,LPSTR,LPDEVMODEA,LPSTR,DWORD);
TRACE("(%04x, %p, %s, %s, %p, %s, %ld)\n", TRACE("(%04x, %p, %s, %s, %p, %s, %ld)\n",
hwnd, lpdmOutput, lpszDevice, lpszPort, lpdmInput, lpszProfile, fwMode ); hwnd, lpdmOutput, lpszDevice, lpszPort, lpdmInput, lpszProfile, fwMode );
@ -388,10 +389,11 @@ INT WINAPI GDI_CallExtDeviceMode16( HWND hwnd,
if ((dc = DC_GetDCPtr( hdc ))) if ((dc = DC_GetDCPtr( hdc )))
{ {
if (dc->funcs->pExtDeviceMode) pExtDeviceMode = dc->funcs->pExtDeviceMode;
ret = dc->funcs->pExtDeviceMode(buf, hwnd, lpdmOutput, lpszDevice, lpszPort, GDI_ReleaseObj( hdc );
if (pExtDeviceMode)
ret = pExtDeviceMode(buf, hwnd, lpdmOutput, lpszDevice, lpszPort,
lpdmInput, lpszProfile, fwMode); lpdmInput, lpszProfile, fwMode);
GDI_ReleaseObj( hdc );
} }
DeleteDC( hdc ); DeleteDC( hdc );
return ret; return ret;