From: Jacek Caban jacek@codeweavers.com
--- dlls/wow64win/gdi.c | 668 ++++++++++++++++++++++---------------------- 1 file changed, 334 insertions(+), 334 deletions(-)
diff --git a/dlls/wow64win/gdi.c b/dlls/wow64win/gdi.c index 5fdc9906a02..4d98a1b9b13 100644 --- a/dlls/wow64win/gdi.c +++ b/dlls/wow64win/gdi.c @@ -27,53 +27,37 @@ #include "ntgdi.h" #include "wow64win_private.h"
-NTSTATUS WINAPI wow64_NtGdiCreateClientObj( UINT *args ) -{ - ULONG type = get_ulong( &args ); - - return HandleToUlong( NtGdiCreateClientObj( type )); -} - -NTSTATUS WINAPI wow64_NtGdiDeleteClientObj( UINT *args ) -{ - HGDIOBJ obj = get_handle( &args ); - - return NtGdiDeleteClientObj( obj ); -} - -NTSTATUS WINAPI wow64_NtGdiExtGetObjectW( UINT *args ) -{ - HGDIOBJ handle = get_handle( &args ); - INT count = get_ulong( &args ); - void *buffer = get_ptr( &args ); - - return NtGdiExtGetObjectW( handle, count, buffer ); -} - -NTSTATUS WINAPI wow64_NtGdiGetDCDword( UINT *args ) +NTSTATUS WINAPI wow64_NtGdiAddFontMemResourceEx( UINT *args ) { - HDC hdc = get_handle( &args ); - UINT method = get_ulong( &args ); - DWORD *result = get_ptr( &args ); + void *ptr = get_ptr( &args ); + DWORD size = get_ulong( &args ); + void *dv = get_ptr( &args ); + ULONG dv_size = get_ulong( &args ); + DWORD *count = get_ptr( &args );
- return NtGdiGetDCDword( hdc, method, result ); + return HandleToUlong( NtGdiAddFontMemResourceEx( ptr, size, dv, dv_size, count )); }
-NTSTATUS WINAPI wow64_NtGdiGetDCObject( UINT *args ) +NTSTATUS WINAPI wow64_NtGdiAddFontResourceW( UINT *args ) { - HDC hdc = get_handle( &args ); - UINT type = get_ulong( &args ); + const WCHAR *str = get_ptr( &args ); + ULONG size = get_ulong( &args ); + ULONG files = get_ulong( &args ); + DWORD flags = get_ulong( &args ); + DWORD tid = get_ulong( &args ); + void *dv = get_ptr( &args );
- return HandleToUlong( NtGdiGetDCObject( hdc, type )); + return NtGdiAddFontResourceW( str, size, files, flags, tid, dv ); }
-NTSTATUS WINAPI wow64_NtGdiGetDCPoint( UINT *args ) +NTSTATUS WINAPI wow64_NtGdiCombineRgn( UINT *args ) { - HDC hdc = get_handle( &args ); - UINT method = get_ulong( &args ); - POINT *result = get_ptr( &args ); + HRGN dest = get_handle( &args ); + HRGN src1 = get_handle( &args ); + HRGN src2 = get_handle( &args ); + INT mode = get_ulong( &args );
- return NtGdiGetDCPoint( hdc, method, result ); + return NtGdiCombineRgn( dest, src1, src2, mode ); }
NTSTATUS WINAPI wow64_NtGdiCreateBitmap( UINT *args ) @@ -87,40 +71,23 @@ NTSTATUS WINAPI wow64_NtGdiCreateBitmap( UINT *args ) return HandleToUlong( NtGdiCreateBitmap( width, height, planes, bpp, bits )); }
-NTSTATUS WINAPI wow64_NtGdiGetBitmapBits( UINT *args ) -{ - HBITMAP bitmap = get_handle( &args ); - LONG count = get_ulong( &args ); - void *bits = get_ptr( &args ); - - return NtGdiGetBitmapBits( bitmap, count, bits ); -} - -NTSTATUS WINAPI wow64_NtGdiSetBitmapBits( UINT *args ) -{ - HBITMAP hbitmap = get_handle( &args ); - LONG count = get_ulong( &args ); - const void *bits = get_ptr( &args ); - - return NtGdiSetBitmapBits( hbitmap, count, bits ); -} - -NTSTATUS WINAPI wow64_NtGdiGetBitmapDimension( UINT *args ) +NTSTATUS WINAPI wow64_NtGdiCreateClientObj( UINT *args ) { - HBITMAP bitmap = get_handle( &args ); - SIZE *size = get_ptr( &args ); + ULONG type = get_ulong( &args );
- return NtGdiGetBitmapDimension( bitmap, size ); + return HandleToUlong( NtGdiCreateClientObj( type )); }
-NTSTATUS WINAPI wow64_NtGdiSetBitmapDimension( UINT *args ) +NTSTATUS WINAPI wow64_NtGdiCreateDIBBrush( UINT *args ) { - HBITMAP hbitmap = get_handle( &args ); - INT x = get_ulong( &args ); - INT y = get_ulong( &args ); - SIZE *prev_size = get_ptr( &args ); + const void *data = get_ptr( &args ); + UINT coloruse = get_ulong( &args ); + UINT size = get_ulong( &args ); + BOOL is_8x8 = get_ulong( &args ); + BOOL pen = get_ulong( &args ); + const void *client = get_ptr( &args );
- return NtGdiSetBitmapDimension( hbitmap, x, y, prev_size ); + return HandleToUlong( NtGdiCreateDIBBrush( data, coloruse, size, is_8x8, pen, client )); }
NTSTATUS WINAPI wow64_NtGdiCreateDIBSection( UINT *args ) @@ -144,16 +111,21 @@ NTSTATUS WINAPI wow64_NtGdiCreateDIBSection( UINT *args ) return HandleToUlong( ret ); }
-NTSTATUS WINAPI wow64_NtGdiCreateDIBBrush( UINT *args ) +NTSTATUS WINAPI wow64_NtGdiCreateEllipticRgn( UINT *args ) { - const void *data = get_ptr( &args ); - UINT coloruse = get_ulong( &args ); - UINT size = get_ulong( &args ); - BOOL is_8x8 = get_ulong( &args ); - BOOL pen = get_ulong( &args ); - const void *client = get_ptr( &args ); + INT left = get_ulong( &args ); + INT top = get_ulong( &args ); + INT right = get_ulong( &args ); + INT bottom = get_ulong( &args );
- return HandleToUlong( NtGdiCreateDIBBrush( data, coloruse, size, is_8x8, pen, client )); + return HandleToUlong( NtGdiCreateEllipticRgn( left, top, right, bottom )); +} + +NTSTATUS WINAPI wow64_NtGdiCreateHalftonePalette( UINT *args ) +{ + HDC hdc = get_handle( &args ); + + return HandleToUlong( NtGdiCreateHalftonePalette( hdc )); }
NTSTATUS WINAPI wow64_NtGdiCreateHatchBrushInternal( UINT *args ) @@ -165,6 +137,14 @@ NTSTATUS WINAPI wow64_NtGdiCreateHatchBrushInternal( UINT *args ) return HandleToULong( NtGdiCreateHatchBrushInternal( style, color, pen )); }
+NTSTATUS WINAPI wow64_NtGdiCreatePaletteInternal( UINT *args ) +{ + const LOGPALETTE *palette = get_ptr( &args ); + UINT count = get_ulong( &args ); + + return HandleToUlong( NtGdiCreatePaletteInternal( palette, count )); +} + NTSTATUS WINAPI wow64_NtGdiCreatePatternBrushInternal( UINT *args ) { HBITMAP hbitmap = get_handle( &args ); @@ -174,14 +154,6 @@ NTSTATUS WINAPI wow64_NtGdiCreatePatternBrushInternal( UINT *args ) return HandleToUlong( NtGdiCreatePatternBrushInternal( hbitmap, pen, is_8x8 )); }
-NTSTATUS WINAPI wow64_NtGdiCreateSolidBrush( UINT *args ) -{ - COLORREF color = get_ulong( &args ); - HBRUSH brush = get_handle( &args ); - - return HandleToUlong( NtGdiCreateSolidBrush( color, brush )); -} - NTSTATUS WINAPI wow64_NtGdiCreatePen( UINT *args ) { INT style = get_ulong( &args ); @@ -192,25 +164,6 @@ NTSTATUS WINAPI wow64_NtGdiCreatePen( UINT *args ) return HandleToUlong( NtGdiCreatePen( style, width, color, brush )); }
-NTSTATUS WINAPI wow64_NtGdiExtCreatePen( UINT *args ) -{ - DWORD style = get_ulong( &args ); - DWORD width = get_ulong( &args ); - ULONG brush_style = get_ulong( &args ); - ULONG color = get_ulong( &args ); - ULONG_PTR client_hatch = get_ulong( &args ); - ULONG_PTR hatch = get_ulong( &args ); - DWORD style_count = get_ulong( &args ); - const DWORD *style_bits = get_ptr( &args ); - ULONG dib_size = get_ulong( &args ); - BOOL old_style = get_ulong( &args ); - HBRUSH brush = get_handle( &args ); - - return HandleToUlong( NtGdiExtCreatePen( style, width, brush_style, color, client_hatch, - hatch, style_count, style_bits, dib_size, - old_style, brush )); -} - NTSTATUS WINAPI wow64_NtGdiCreateRectRgn( UINT *args ) { INT left = get_ulong( &args ); @@ -234,182 +187,217 @@ NTSTATUS WINAPI wow64_NtGdiCreateRoundRectRgn( UINT *args ) ellipse_width, ellipse_height )); }
-NTSTATUS WINAPI wow64_NtGdiCreateEllipticRgn( UINT *args ) +NTSTATUS WINAPI wow64_NtGdiCreateSolidBrush( UINT *args ) { - INT left = get_ulong( &args ); - INT top = get_ulong( &args ); - INT right = get_ulong( &args ); - INT bottom = get_ulong( &args ); + COLORREF color = get_ulong( &args ); + HBRUSH brush = get_handle( &args );
- return HandleToUlong( NtGdiCreateEllipticRgn( left, top, right, bottom )); + return HandleToUlong( NtGdiCreateSolidBrush( color, brush )); }
-NTSTATUS WINAPI wow64_NtGdiExtCreateRegion( UINT *args ) +NTSTATUS WINAPI wow64_NtGdiDdDDICreateDevice( UINT *args ) { - const XFORM *xform = get_ptr( &args ); - DWORD count = get_ulong( &args ); - const RGNDATA *data = get_ptr( &args ); - - return HandleToUlong( NtGdiExtCreateRegion( xform, count, data )); -} + struct + { + D3DKMT_HANDLE hAdapter; + D3DKMT_CREATEDEVICEFLAGS Flags; + D3DKMT_HANDLE hDevice; + ULONG pCommandBuffer; + UINT CommandBufferSize; + ULONG pAllocationList; + UINT AllocationListSize; + ULONG pPatchLocationList; + UINT PatchLocationListSize; + } *desc32 = get_ptr( &args );
-NTSTATUS WINAPI wow64_NtGdiGetRegionData( UINT *args ) -{ - HRGN hrgn = get_ptr( &args ); - DWORD count = get_ulong( &args ); - RGNDATA *data = get_ptr( &args ); + D3DKMT_CREATEDEVICE desc = + { + { desc32->hAdapter }, + desc32->Flags + }; + NTSTATUS status;
- return NtGdiGetRegionData( hrgn, count, data ); + if (!(status = NtGdiDdDDICreateDevice( &desc ))) + { + desc32->hDevice = desc.hDevice; + desc32->pCommandBuffer = PtrToUlong( desc.pCommandBuffer ); + desc32->CommandBufferSize = desc.CommandBufferSize; + desc32->pAllocationList = PtrToUlong( desc.pAllocationList ); + desc32->AllocationListSize = desc.AllocationListSize; + desc32->pPatchLocationList = PtrToUlong( desc.pPatchLocationList ); + desc32->PatchLocationListSize = desc.PatchLocationListSize; + } + return status; }
-NTSTATUS WINAPI wow64_NtGdiEqualRgn( UINT *args ) +NTSTATUS WINAPI wow64_NtGdiDdDDIOpenAdapterFromHdc( UINT *args ) { - HRGN hrgn1 = get_handle( &args ); - HRGN hrgn2 = get_handle( &args ); + struct + { + ULONG hDc; + D3DKMT_HANDLE hAdapter; + LUID AdapterLuid; + D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId; + } *desc32 = get_ptr( &args );
- return NtGdiEqualRgn( hrgn1, hrgn2 ); + D3DKMT_OPENADAPTERFROMHDC desc = { UlongToHandle( desc32->hDc ) }; + NTSTATUS status; + + if (!(status = NtGdiDdDDIOpenAdapterFromHdc( &desc ))) + { + desc32->hAdapter = desc.hAdapter; + desc32->AdapterLuid = desc.AdapterLuid; + desc32->VidPnSourceId = desc.VidPnSourceId; + } + return status; }
-NTSTATUS WINAPI wow64_NtGdiGetRgnBox( UINT *args ) +NTSTATUS WINAPI wow64_NtGdiDdDDIQueryStatistics( UINT *args ) { - HRGN hrgn = get_handle( &args ); - RECT *rect = get_ptr( &args ); + D3DKMT_QUERYSTATISTICS *stats = get_ptr( &args );
- return NtGdiGetRgnBox( hrgn, rect ); + return NtGdiDdDDIQueryStatistics( stats ); }
-NTSTATUS WINAPI wow64_NtGdiSetRectRgn( UINT *args ) +NTSTATUS WINAPI wow64_NtGdiDdDDISetQueuedLimit( UINT *args ) { - HRGN hrgn = get_handle( &args ); - INT left = get_ulong( &args ); - INT top = get_ulong( &args ); - INT right = get_ulong( &args ); - INT bottom = get_ulong( &args ); + D3DKMT_SETQUEUEDLIMIT *desc = get_ptr( &args );
- return NtGdiSetRectRgn( hrgn, left, top, right, bottom ); + return NtGdiDdDDISetQueuedLimit( desc ); }
-NTSTATUS WINAPI wow64_NtGdiOffsetRgn( UINT *args ) +NTSTATUS WINAPI wow64_NtGdiDeleteClientObj( UINT *args ) { - HRGN hrgn = get_handle( &args ); - INT x = get_ulong( &args ); - INT y = get_ulong( &args ); + HGDIOBJ obj = get_handle( &args );
- return NtGdiOffsetRgn( hrgn, x, y ); + return NtGdiDeleteClientObj( obj ); }
-NTSTATUS WINAPI wow64_NtGdiCombineRgn( UINT *args ) +NTSTATUS WINAPI wow64_NtGdiDescribePixelFormat( UINT *args ) { - HRGN dest = get_handle( &args ); - HRGN src1 = get_handle( &args ); - HRGN src2 = get_handle( &args ); - INT mode = get_ulong( &args ); + HDC hdc = get_handle( &args ); + INT format = get_ulong( &args ); + UINT size = get_ulong( &args ); + PIXELFORMATDESCRIPTOR *descr = get_ptr( &args );
- return NtGdiCombineRgn( dest, src1, src2, mode ); + return NtGdiDescribePixelFormat( hdc, format, size, descr ); }
-NTSTATUS WINAPI wow64_NtGdiPtInRegion( UINT *args ) +NTSTATUS WINAPI wow64_NtGdiDrawStream( UINT *args ) { - HRGN hrgn = get_handle( &args ); - INT x = get_ulong( &args ); - INT y = get_ulong( &args ); + HDC hdc = get_handle( &args ); + ULONG in = get_ulong( &args ); + void *pvin = get_ptr( &args );
- return NtGdiPtInRegion( hrgn, x, y ); + return NtGdiDrawStream( hdc, in, pvin ); }
-NTSTATUS WINAPI wow64_NtGdiRectInRegion( UINT *args ) +NTSTATUS WINAPI wow64_NtGdiEqualRgn( UINT *args ) { - HRGN hrgn = get_handle( &args ); - const RECT *rect = get_ptr( &args ); + HRGN hrgn1 = get_handle( &args ); + HRGN hrgn2 = get_handle( &args );
- return NtGdiRectInRegion( hrgn, rect ); + return NtGdiEqualRgn( hrgn1, hrgn2 ); }
-NTSTATUS WINAPI wow64_NtGdiSetMetaRgn( UINT *args ) +NTSTATUS WINAPI wow64_NtGdiExtCreatePen( UINT *args ) { - HDC hdc = get_handle( &args ); + DWORD style = get_ulong( &args ); + DWORD width = get_ulong( &args ); + ULONG brush_style = get_ulong( &args ); + ULONG color = get_ulong( &args ); + ULONG_PTR client_hatch = get_ulong( &args ); + ULONG_PTR hatch = get_ulong( &args ); + DWORD style_count = get_ulong( &args ); + const DWORD *style_bits = get_ptr( &args ); + ULONG dib_size = get_ulong( &args ); + BOOL old_style = get_ulong( &args ); + HBRUSH brush = get_handle( &args );
- return NtGdiSetMetaRgn( hdc ); + return HandleToUlong( NtGdiExtCreatePen( style, width, brush_style, color, client_hatch, + hatch, style_count, style_bits, dib_size, + old_style, brush )); }
-NTSTATUS WINAPI wow64_NtGdiSaveDC( UINT *args ) +NTSTATUS WINAPI wow64_NtGdiExtCreateRegion( UINT *args ) { - HDC hdc = get_handle( &args ); + const XFORM *xform = get_ptr( &args ); + DWORD count = get_ulong( &args ); + const RGNDATA *data = get_ptr( &args );
- return NtGdiSaveDC( hdc ); + return HandleToUlong( NtGdiExtCreateRegion( xform, count, data )); }
-NTSTATUS WINAPI wow64_NtGdiSetBrushOrg( UINT *args ) +NTSTATUS WINAPI wow64_NtGdiExtGetObjectW( UINT *args ) { - HDC hdc = get_handle( &args ); - INT x = get_ulong( &args ); - INT y = get_ulong( &args ); - POINT *prev_org = get_ptr( &args ); + HGDIOBJ handle = get_handle( &args ); + INT count = get_ulong( &args ); + void *buffer = get_ptr( &args );
- return NtGdiSetBrushOrg( hdc, x, y, prev_org ); + return NtGdiExtGetObjectW( handle, count, buffer ); }
-NTSTATUS WINAPI wow64_NtGdiGetTransform( UINT *args ) +NTSTATUS WINAPI wow64_NtGdiFlattenPath( UINT *args ) { HDC hdc = get_handle( &args ); - DWORD which = get_ulong( &args ); - XFORM *xform = get_ptr( &args );
- return NtGdiGetTransform( hdc, which, xform ); + return NtGdiFlattenPath( hdc ); }
-NTSTATUS WINAPI wow64_NtGdiDescribePixelFormat( UINT *args ) +NTSTATUS WINAPI wow64_NtGdiFlush( UINT *args ) { - HDC hdc = get_handle( &args ); - INT format = get_ulong( &args ); - UINT size = get_ulong( &args ); - PIXELFORMATDESCRIPTOR *descr = get_ptr( &args ); + return NtGdiFlush(); +}
- return NtGdiDescribePixelFormat( hdc, format, size, descr ); +NTSTATUS WINAPI wow64_NtGdiGetBitmapBits( UINT *args ) +{ + HBITMAP bitmap = get_handle( &args ); + LONG count = get_ulong( &args ); + void *bits = get_ptr( &args ); + + return NtGdiGetBitmapBits( bitmap, count, bits ); }
-NTSTATUS WINAPI wow64_NtGdiSetPixelFormat( UINT *args ) +NTSTATUS WINAPI wow64_NtGdiGetBitmapDimension( UINT *args ) { - HDC hdc = get_handle( &args ); - INT format = get_ulong( &args ); + HBITMAP bitmap = get_handle( &args ); + SIZE *size = get_ptr( &args );
- return NtGdiSetPixelFormat( hdc, format ); + return NtGdiGetBitmapDimension( bitmap, size ); }
-NTSTATUS WINAPI wow64_NtGdiSwapBuffers( UINT *args ) +NTSTATUS WINAPI wow64_NtGdiGetColorAdjustment( UINT *args ) { HDC hdc = get_handle( &args ); + COLORADJUSTMENT *ca = get_ptr( &args );
- return NtGdiSwapBuffers( hdc ); + return NtGdiGetColorAdjustment( hdc, ca ); }
-NTSTATUS WINAPI wow64_NtGdiDrawStream( UINT *args ) +NTSTATUS WINAPI wow64_NtGdiGetDCDword( UINT *args ) { HDC hdc = get_handle( &args ); - ULONG in = get_ulong( &args ); - void *pvin = get_ptr( &args ); + UINT method = get_ulong( &args ); + DWORD *result = get_ptr( &args );
- return NtGdiDrawStream( hdc, in, pvin ); + return NtGdiGetDCDword( hdc, method, result ); }
-NTSTATUS WINAPI wow64_NtGdiSetTextJustification( UINT *args ) +NTSTATUS WINAPI wow64_NtGdiGetDCObject( UINT *args ) { HDC hdc = get_handle( &args ); - INT extra = get_ulong( &args ); - INT breaks = get_ulong( &args ); + UINT type = get_ulong( &args );
- return NtGdiSetTextJustification( hdc, extra, breaks ); + return HandleToUlong( NtGdiGetDCObject( hdc, type )); }
-NTSTATUS WINAPI wow64_NtGdiHfontCreate( UINT *args ) +NTSTATUS WINAPI wow64_NtGdiGetDCPoint( UINT *args ) { - const void *logfont = get_ptr( &args ); - ULONG unk2 = get_ulong( &args ); - ULONG unk3 = get_ulong( &args ); - ULONG unk4 = get_ulong( &args ); - void *data = get_ptr( &args ); + HDC hdc = get_handle( &args ); + UINT method = get_ulong( &args ); + POINT *result = get_ptr( &args );
- return HandleToUlong( NtGdiHfontCreate( logfont, unk2, unk3, unk4, data )); + return NtGdiGetDCPoint( hdc, method, result ); }
NTSTATUS WINAPI wow64_NtGdiGetFontFileData( UINT *args ) @@ -439,236 +427,248 @@ NTSTATUS WINAPI wow64_NtGdiGetFontFileInfo( UINT *args ) return ret; }
-NTSTATUS WINAPI wow64_NtGdiAddFontMemResourceEx( UINT *args ) +NTSTATUS WINAPI wow64_NtGdiGetNearestPaletteIndex( UINT *args ) { - void *ptr = get_ptr( &args ); - DWORD size = get_ulong( &args ); - void *dv = get_ptr( &args ); - ULONG dv_size = get_ulong( &args ); - DWORD *count = get_ptr( &args ); + HPALETTE hpalette = get_handle( &args ); + COLORREF color = get_ulong( &args );
- return HandleToUlong( NtGdiAddFontMemResourceEx( ptr, size, dv, dv_size, count )); + return NtGdiGetNearestPaletteIndex( hpalette, color ); }
-NTSTATUS WINAPI wow64_NtGdiAddFontResourceW( UINT *args ) +NTSTATUS WINAPI wow64_NtGdiGetPath( UINT *args ) { - const WCHAR *str = get_ptr( &args ); - ULONG size = get_ulong( &args ); - ULONG files = get_ulong( &args ); - DWORD flags = get_ulong( &args ); - DWORD tid = get_ulong( &args ); - void *dv = get_ptr( &args ); + HDC hdc = get_handle( &args ); + POINT *points = get_ptr( &args ); + BYTE *types = get_ptr( &args ); + INT size = get_ulong( &args );
- return NtGdiAddFontResourceW( str, size, files, flags, tid, dv ); + return NtGdiGetPath( hdc, points, types, size ); }
-NTSTATUS WINAPI wow64_NtGdiRemoveFontMemResourceEx( UINT *args ) +NTSTATUS WINAPI wow64_NtGdiGetRegionData( UINT *args ) { - HANDLE handle = get_handle( &args ); + HRGN hrgn = get_ptr( &args ); + DWORD count = get_ulong( &args ); + RGNDATA *data = get_ptr( &args );
- return NtGdiRemoveFontMemResourceEx( handle ); + return NtGdiGetRegionData( hrgn, count, data ); }
-NTSTATUS WINAPI wow64_NtGdiRemoveFontResourceW( UINT *args ) +NTSTATUS WINAPI wow64_NtGdiGetRgnBox( UINT *args ) { - const WCHAR *str = get_ptr( &args ); - ULONG size = get_ulong( &args ); - ULONG files = get_ulong( &args ); - DWORD flags = get_ulong( &args ); - DWORD tid = get_ulong( &args ); - void *dv = get_ptr( &args ); + HRGN hrgn = get_handle( &args ); + RECT *rect = get_ptr( &args );
- return NtGdiRemoveFontResourceW( str, size, files, flags, tid, dv ); + return NtGdiGetRgnBox( hrgn, rect ); }
-NTSTATUS WINAPI wow64_NtGdiGetColorAdjustment( UINT *args ) +NTSTATUS WINAPI wow64_NtGdiGetSpoolMessage( UINT *args ) { - HDC hdc = get_handle( &args ); - COLORADJUSTMENT *ca = get_ptr( &args ); + void *ptr1 = get_ptr( &args ); + DWORD data2 = get_ulong( &args ); + void *ptr3 = get_ptr( &args ); + DWORD data4 = get_ulong( &args );
- return NtGdiGetColorAdjustment( hdc, ca ); + return NtGdiGetSpoolMessage( ptr1, data2, ptr3, data4 ); }
-NTSTATUS WINAPI wow64_NtGdiSetColorAdjustment( UINT *args ) +NTSTATUS WINAPI wow64_NtGdiGetSystemPaletteUse( UINT *args ) { HDC hdc = get_handle( &args ); - const COLORADJUSTMENT *ca = get_ptr( &args );
- return NtGdiSetColorAdjustment( hdc, ca ); + return NtGdiGetSystemPaletteUse( hdc ); }
-NTSTATUS WINAPI wow64_NtGdiSetVirtualResolution( UINT *args ) +NTSTATUS WINAPI wow64_NtGdiGetTransform( UINT *args ) { HDC hdc = get_handle( &args ); - DWORD horz_res = get_ulong( &args ); - DWORD vert_res = get_ulong( &args ); - DWORD horz_size = get_ulong( &args ); - DWORD vert_size = get_ulong( &args ); + DWORD which = get_ulong( &args ); + XFORM *xform = get_ptr( &args );
- return NtGdiSetVirtualResolution( hdc, horz_res, vert_res, horz_size, vert_size ); + return NtGdiGetTransform( hdc, which, xform ); }
-NTSTATUS WINAPI wow64_NtGdiTransformPoints( UINT *args ) +NTSTATUS WINAPI wow64_NtGdiHfontCreate( UINT *args ) { - HDC hdc = get_handle( &args ); - const POINT *points_in = get_ptr( &args ); - POINT *points_out = get_ptr( &args ); - INT count = get_ulong( &args ); - UINT mode = get_ulong( &args ); + const void *logfont = get_ptr( &args ); + ULONG unk2 = get_ulong( &args ); + ULONG unk3 = get_ulong( &args ); + ULONG unk4 = get_ulong( &args ); + void *data = get_ptr( &args );
- return NtGdiTransformPoints( hdc, points_in, points_out, count, mode ); + return HandleToUlong( NtGdiHfontCreate( logfont, unk2, unk3, unk4, data )); }
-NTSTATUS WINAPI wow64_NtGdiCreatePaletteInternal( UINT *args ) +NTSTATUS WINAPI wow64_NtGdiInitSpool( UINT *args ) { - const LOGPALETTE *palette = get_ptr( &args ); - UINT count = get_ulong( &args ); + return NtGdiInitSpool(); +}
- return HandleToUlong( NtGdiCreatePaletteInternal( palette, count )); +NTSTATUS WINAPI wow64_NtGdiOffsetRgn( UINT *args ) +{ + HRGN hrgn = get_handle( &args ); + INT x = get_ulong( &args ); + INT y = get_ulong( &args ); + + return NtGdiOffsetRgn( hrgn, x, y ); }
-NTSTATUS WINAPI wow64_NtGdiCreateHalftonePalette( UINT *args ) +NTSTATUS WINAPI wow64_NtGdiPathToRegion( UINT *args ) { HDC hdc = get_handle( &args );
- return HandleToUlong( NtGdiCreateHalftonePalette( hdc )); + return HandleToUlong( NtGdiPathToRegion( hdc )); }
-NTSTATUS WINAPI wow64_NtGdiGetNearestPaletteIndex( UINT *args ) +NTSTATUS WINAPI wow64_NtGdiPtInRegion( UINT *args ) { - HPALETTE hpalette = get_handle( &args ); - COLORREF color = get_ulong( &args ); + HRGN hrgn = get_handle( &args ); + INT x = get_ulong( &args ); + INT y = get_ulong( &args );
- return NtGdiGetNearestPaletteIndex( hpalette, color ); + return NtGdiPtInRegion( hrgn, x, y ); }
-NTSTATUS WINAPI wow64_NtGdiGetSystemPaletteUse( UINT *args ) +NTSTATUS WINAPI wow64_NtGdiRectInRegion( UINT *args ) { - HDC hdc = get_handle( &args ); + HRGN hrgn = get_handle( &args ); + const RECT *rect = get_ptr( &args );
- return NtGdiGetSystemPaletteUse( hdc ); + return NtGdiRectInRegion( hrgn, rect ); }
-NTSTATUS WINAPI wow64_NtGdiSetMagicColors( UINT *args ) +NTSTATUS WINAPI wow64_NtGdiRemoveFontMemResourceEx( UINT *args ) { - HDC hdc = get_handle( &args ); - DWORD magic = get_ulong( &args ); - ULONG index = get_ulong( &args ); + HANDLE handle = get_handle( &args );
- return NtGdiSetMagicColors( hdc, magic, index ); + return NtGdiRemoveFontMemResourceEx( handle ); }
-NTSTATUS WINAPI wow64_NtGdiGetPath( UINT *args ) +NTSTATUS WINAPI wow64_NtGdiRemoveFontResourceW( UINT *args ) { - HDC hdc = get_handle( &args ); - POINT *points = get_ptr( &args ); - BYTE *types = get_ptr( &args ); - INT size = get_ulong( &args ); + const WCHAR *str = get_ptr( &args ); + ULONG size = get_ulong( &args ); + ULONG files = get_ulong( &args ); + DWORD flags = get_ulong( &args ); + DWORD tid = get_ulong( &args ); + void *dv = get_ptr( &args );
- return NtGdiGetPath( hdc, points, types, size ); + return NtGdiRemoveFontResourceW( str, size, files, flags, tid, dv ); }
-NTSTATUS WINAPI wow64_NtGdiPathToRegion( UINT *args ) +NTSTATUS WINAPI wow64_NtGdiSaveDC( UINT *args ) { HDC hdc = get_handle( &args );
- return HandleToUlong( NtGdiPathToRegion( hdc )); + return NtGdiSaveDC( hdc ); }
-NTSTATUS WINAPI wow64_NtGdiFlattenPath( UINT *args ) +NTSTATUS WINAPI wow64_NtGdiSetBitmapBits( UINT *args ) +{ + HBITMAP hbitmap = get_handle( &args ); + LONG count = get_ulong( &args ); + const void *bits = get_ptr( &args ); + + return NtGdiSetBitmapBits( hbitmap, count, bits ); +} + +NTSTATUS WINAPI wow64_NtGdiSetBitmapDimension( UINT *args ) +{ + HBITMAP hbitmap = get_handle( &args ); + INT x = get_ulong( &args ); + INT y = get_ulong( &args ); + SIZE *prev_size = get_ptr( &args ); + + return NtGdiSetBitmapDimension( hbitmap, x, y, prev_size ); +} + +NTSTATUS WINAPI wow64_NtGdiSetBrushOrg( UINT *args ) { HDC hdc = get_handle( &args ); + INT x = get_ulong( &args ); + INT y = get_ulong( &args ); + POINT *prev_org = get_ptr( &args );
- return NtGdiFlattenPath( hdc ); + return NtGdiSetBrushOrg( hdc, x, y, prev_org ); }
-NTSTATUS WINAPI wow64_NtGdiGetSpoolMessage( UINT *args ) +NTSTATUS WINAPI wow64_NtGdiSetColorAdjustment( UINT *args ) { - void *ptr1 = get_ptr( &args ); - DWORD data2 = get_ulong( &args ); - void *ptr3 = get_ptr( &args ); - DWORD data4 = get_ulong( &args ); + HDC hdc = get_handle( &args ); + const COLORADJUSTMENT *ca = get_ptr( &args );
- return NtGdiGetSpoolMessage( ptr1, data2, ptr3, data4 ); + return NtGdiSetColorAdjustment( hdc, ca ); }
-NTSTATUS WINAPI wow64_NtGdiInitSpool( UINT *args ) +NTSTATUS WINAPI wow64_NtGdiSetMagicColors( UINT *args ) { - return NtGdiInitSpool(); + HDC hdc = get_handle( &args ); + DWORD magic = get_ulong( &args ); + ULONG index = get_ulong( &args ); + + return NtGdiSetMagicColors( hdc, magic, index ); }
-NTSTATUS WINAPI wow64_NtGdiFlush( UINT *args ) +NTSTATUS WINAPI wow64_NtGdiSetMetaRgn( UINT *args ) { - return NtGdiFlush(); + HDC hdc = get_handle( &args ); + + return NtGdiSetMetaRgn( hdc ); }
-NTSTATUS WINAPI wow64_NtGdiDdDDICreateDevice( UINT *args ) +NTSTATUS WINAPI wow64_NtGdiSetPixelFormat( UINT *args ) { - struct - { - D3DKMT_HANDLE hAdapter; - D3DKMT_CREATEDEVICEFLAGS Flags; - D3DKMT_HANDLE hDevice; - ULONG pCommandBuffer; - UINT CommandBufferSize; - ULONG pAllocationList; - UINT AllocationListSize; - ULONG pPatchLocationList; - UINT PatchLocationListSize; - } *desc32 = get_ptr( &args ); + HDC hdc = get_handle( &args ); + INT format = get_ulong( &args );
- D3DKMT_CREATEDEVICE desc = - { - { desc32->hAdapter }, - desc32->Flags - }; - NTSTATUS status; + return NtGdiSetPixelFormat( hdc, format ); +}
- if (!(status = NtGdiDdDDICreateDevice( &desc ))) - { - desc32->hDevice = desc.hDevice; - desc32->pCommandBuffer = PtrToUlong( desc.pCommandBuffer ); - desc32->CommandBufferSize = desc.CommandBufferSize; - desc32->pAllocationList = PtrToUlong( desc.pAllocationList ); - desc32->AllocationListSize = desc.AllocationListSize; - desc32->pPatchLocationList = PtrToUlong( desc.pPatchLocationList ); - desc32->PatchLocationListSize = desc.PatchLocationListSize; - } - return status; +NTSTATUS WINAPI wow64_NtGdiSetRectRgn( UINT *args ) +{ + HRGN hrgn = get_handle( &args ); + INT left = get_ulong( &args ); + INT top = get_ulong( &args ); + INT right = get_ulong( &args ); + INT bottom = get_ulong( &args ); + + return NtGdiSetRectRgn( hrgn, left, top, right, bottom ); }
-NTSTATUS WINAPI wow64_NtGdiDdDDIOpenAdapterFromHdc( UINT *args ) +NTSTATUS WINAPI wow64_NtGdiSetTextJustification( UINT *args ) { - struct - { - ULONG hDc; - D3DKMT_HANDLE hAdapter; - LUID AdapterLuid; - D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId; - } *desc32 = get_ptr( &args ); + HDC hdc = get_handle( &args ); + INT extra = get_ulong( &args ); + INT breaks = get_ulong( &args );
- D3DKMT_OPENADAPTERFROMHDC desc = { UlongToHandle( desc32->hDc ) }; - NTSTATUS status; + return NtGdiSetTextJustification( hdc, extra, breaks ); +}
- if (!(status = NtGdiDdDDIOpenAdapterFromHdc( &desc ))) - { - desc32->hAdapter = desc.hAdapter; - desc32->AdapterLuid = desc.AdapterLuid; - desc32->VidPnSourceId = desc.VidPnSourceId; - } - return status; +NTSTATUS WINAPI wow64_NtGdiSetVirtualResolution( UINT *args ) +{ + HDC hdc = get_handle( &args ); + DWORD horz_res = get_ulong( &args ); + DWORD vert_res = get_ulong( &args ); + DWORD horz_size = get_ulong( &args ); + DWORD vert_size = get_ulong( &args ); + + return NtGdiSetVirtualResolution( hdc, horz_res, vert_res, horz_size, vert_size ); }
-NTSTATUS WINAPI wow64_NtGdiDdDDIQueryStatistics( UINT *args ) +NTSTATUS WINAPI wow64_NtGdiSwapBuffers( UINT *args ) { - D3DKMT_QUERYSTATISTICS *stats = get_ptr( &args ); + HDC hdc = get_handle( &args );
- return NtGdiDdDDIQueryStatistics( stats ); + return NtGdiSwapBuffers( hdc ); }
-NTSTATUS WINAPI wow64_NtGdiDdDDISetQueuedLimit( UINT *args ) +NTSTATUS WINAPI wow64_NtGdiTransformPoints( UINT *args ) { - D3DKMT_SETQUEUEDLIMIT *desc = get_ptr( &args ); + HDC hdc = get_handle( &args ); + const POINT *points_in = get_ptr( &args ); + POINT *points_out = get_ptr( &args ); + INT count = get_ulong( &args ); + UINT mode = get_ulong( &args );
- return NtGdiDdDDISetQueuedLimit( desc ); + return NtGdiTransformPoints( hdc, points_in, points_out, count, mode ); }