wow64win: Fix NtGdiDdDDICreateDevice thunk.
[wine.git] / dlls / wow64win / gdi.c
blob6fa36b5f3a3dd7e69342a76ee87894d597ed8257
1 /*
2 * WoW64 GDI functions
4 * Copyright 2021 Jacek Caban for CodeWeavers
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #include <stdarg.h>
23 #include "ntstatus.h"
24 #define WIN32_NO_STATUS
25 #include "windef.h"
26 #include "winbase.h"
27 #include "ntgdi.h"
28 #include "wow64win_private.h"
30 typedef struct
32 INT bmType;
33 INT bmWidth;
34 INT bmHeight;
35 INT bmWidthBytes;
36 WORD bmPlanes;
37 WORD bmBitsPixel;
38 ULONG bmBits;
39 } BITMAP32;
41 typedef struct
43 DWORD elpPenStyle;
44 DWORD elpWidth;
45 UINT elpBrushStyle;
46 COLORREF elpColor;
47 ULONG elpHatch;
48 DWORD elpNumEntries;
49 DWORD elpStyleEntry[1];
50 } EXTLOGPEN32;
53 static DWORD gdi_handle_type( HGDIOBJ obj )
55 unsigned int handle = HandleToUlong( obj );
56 return handle & NTGDI_HANDLE_TYPE_MASK;
59 NTSTATUS WINAPI wow64_NtGdiAddFontMemResourceEx( UINT *args )
61 void *ptr = get_ptr( &args );
62 DWORD size = get_ulong( &args );
63 void *dv = get_ptr( &args );
64 ULONG dv_size = get_ulong( &args );
65 DWORD *count = get_ptr( &args );
67 return HandleToUlong( NtGdiAddFontMemResourceEx( ptr, size, dv, dv_size, count ));
70 NTSTATUS WINAPI wow64_NtGdiAddFontResourceW( UINT *args )
72 const WCHAR *str = get_ptr( &args );
73 ULONG size = get_ulong( &args );
74 ULONG files = get_ulong( &args );
75 DWORD flags = get_ulong( &args );
76 DWORD tid = get_ulong( &args );
77 void *dv = get_ptr( &args );
79 return NtGdiAddFontResourceW( str, size, files, flags, tid, dv );
82 NTSTATUS WINAPI wow64_NtGdiCombineRgn( UINT *args )
84 HRGN dest = get_handle( &args );
85 HRGN src1 = get_handle( &args );
86 HRGN src2 = get_handle( &args );
87 INT mode = get_ulong( &args );
89 return NtGdiCombineRgn( dest, src1, src2, mode );
92 NTSTATUS WINAPI wow64_NtGdiCreateBitmap( UINT *args )
94 INT width = get_ulong( &args );
95 INT height = get_ulong( &args );
96 UINT planes = get_ulong( &args );
97 UINT bpp = get_ulong( &args );
98 const void *bits = get_ptr( &args );
100 return HandleToUlong( NtGdiCreateBitmap( width, height, planes, bpp, bits ));
103 NTSTATUS WINAPI wow64_NtGdiCreateClientObj( UINT *args )
105 ULONG type = get_ulong( &args );
107 return HandleToUlong( NtGdiCreateClientObj( type ));
110 NTSTATUS WINAPI wow64_NtGdiCreateDIBBrush( UINT *args )
112 const void *data = get_ptr( &args );
113 UINT coloruse = get_ulong( &args );
114 UINT size = get_ulong( &args );
115 BOOL is_8x8 = get_ulong( &args );
116 BOOL pen = get_ulong( &args );
117 const void *client = get_ptr( &args );
119 return HandleToUlong( NtGdiCreateDIBBrush( data, coloruse, size, is_8x8, pen, client ));
122 NTSTATUS WINAPI wow64_NtGdiCreateDIBSection( UINT *args )
124 HDC hdc = get_handle( &args );
125 HANDLE section = get_handle( &args );
126 DWORD offset = get_ulong( &args );
127 const BITMAPINFO *bmi = get_ptr( &args );
128 UINT usage = get_ulong( &args );
129 UINT header_size = get_ulong( &args );
130 ULONG flags = get_ulong( &args );
131 ULONG_PTR color_space = get_ulong( &args );
132 void *bits32 = get_ptr( &args );
134 void *bits;
135 HBITMAP ret;
137 ret = NtGdiCreateDIBSection( hdc, section, offset, bmi, usage, header_size,
138 flags, color_space, addr_32to64( &bits, bits32 ));
139 put_addr( bits32, bits );
140 return HandleToUlong( ret );
143 NTSTATUS WINAPI wow64_NtGdiCreateEllipticRgn( UINT *args )
145 INT left = get_ulong( &args );
146 INT top = get_ulong( &args );
147 INT right = get_ulong( &args );
148 INT bottom = get_ulong( &args );
150 return HandleToUlong( NtGdiCreateEllipticRgn( left, top, right, bottom ));
153 NTSTATUS WINAPI wow64_NtGdiCreateHalftonePalette( UINT *args )
155 HDC hdc = get_handle( &args );
157 return HandleToUlong( NtGdiCreateHalftonePalette( hdc ));
160 NTSTATUS WINAPI wow64_NtGdiCreateHatchBrushInternal( UINT *args )
162 INT style = get_ulong( &args );
163 COLORREF color = get_ulong( &args );
164 BOOL pen = get_ulong( &args );
166 return HandleToULong( NtGdiCreateHatchBrushInternal( style, color, pen ));
169 NTSTATUS WINAPI wow64_NtGdiCreatePaletteInternal( UINT *args )
171 const LOGPALETTE *palette = get_ptr( &args );
172 UINT count = get_ulong( &args );
174 return HandleToUlong( NtGdiCreatePaletteInternal( palette, count ));
177 NTSTATUS WINAPI wow64_NtGdiCreatePatternBrushInternal( UINT *args )
179 HBITMAP hbitmap = get_handle( &args );
180 BOOL pen = get_ulong( &args );
181 BOOL is_8x8 = get_ulong( &args );
183 return HandleToUlong( NtGdiCreatePatternBrushInternal( hbitmap, pen, is_8x8 ));
186 NTSTATUS WINAPI wow64_NtGdiCreatePen( UINT *args )
188 INT style = get_ulong( &args );
189 INT width = get_ulong( &args );
190 COLORREF color = get_ulong( &args );
191 HBRUSH brush = get_handle( &args );
193 return HandleToUlong( NtGdiCreatePen( style, width, color, brush ));
196 NTSTATUS WINAPI wow64_NtGdiCreateRectRgn( UINT *args )
198 INT left = get_ulong( &args );
199 INT top = get_ulong( &args );
200 INT right = get_ulong( &args );
201 INT bottom = get_ulong( &args );
203 return HandleToUlong( NtGdiCreateRectRgn( left, top, right, bottom ));
206 NTSTATUS WINAPI wow64_NtGdiCreateRoundRectRgn( UINT *args )
208 INT left = get_ulong( &args );
209 INT top = get_ulong( &args );
210 INT right = get_ulong( &args );
211 INT bottom = get_ulong( &args );
212 INT ellipse_width = get_ulong( &args );
213 INT ellipse_height = get_ulong( &args );
215 return HandleToUlong( NtGdiCreateRoundRectRgn( left, top, right, bottom,
216 ellipse_width, ellipse_height ));
219 NTSTATUS WINAPI wow64_NtGdiCreateSolidBrush( UINT *args )
221 COLORREF color = get_ulong( &args );
222 HBRUSH brush = get_handle( &args );
224 return HandleToUlong( NtGdiCreateSolidBrush( color, brush ));
227 NTSTATUS WINAPI wow64_NtGdiDdDDICreateDevice( UINT *args )
229 struct
231 D3DKMT_HANDLE hAdapter;
232 D3DKMT_CREATEDEVICEFLAGS Flags;
233 D3DKMT_HANDLE hDevice;
234 ULONG pCommandBuffer;
235 UINT CommandBufferSize;
236 ULONG pAllocationList;
237 UINT AllocationListSize;
238 ULONG pPatchLocationList;
239 UINT PatchLocationListSize;
240 } *desc32 = get_ptr( &args );
242 D3DKMT_CREATEDEVICE desc;
243 NTSTATUS status;
245 if (!desc32) return STATUS_INVALID_PARAMETER;
246 desc.hAdapter = desc32->hAdapter;
247 desc.Flags = desc32->Flags;
248 desc.pCommandBuffer = UlongToPtr( desc32->pCommandBuffer );
249 desc.CommandBufferSize = desc32->CommandBufferSize;
250 desc.pAllocationList = UlongToPtr( desc32->pAllocationList );
251 desc.AllocationListSize = desc32->AllocationListSize;
252 desc.pPatchLocationList = UlongToPtr( desc32->pPatchLocationList );
253 desc.PatchLocationListSize = desc32->PatchLocationListSize;
254 if (!(status = NtGdiDdDDICreateDevice( &desc )))
255 desc32->hDevice = desc.hDevice;
256 return status;
259 NTSTATUS WINAPI wow64_NtGdiDdDDIOpenAdapterFromHdc( UINT *args )
261 struct
263 ULONG hDc;
264 D3DKMT_HANDLE hAdapter;
265 LUID AdapterLuid;
266 D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId;
267 } *desc32 = get_ptr( &args );
269 D3DKMT_OPENADAPTERFROMHDC desc = { UlongToHandle( desc32->hDc ) };
270 NTSTATUS status;
272 if (!(status = NtGdiDdDDIOpenAdapterFromHdc( &desc )))
274 desc32->hAdapter = desc.hAdapter;
275 desc32->AdapterLuid = desc.AdapterLuid;
276 desc32->VidPnSourceId = desc.VidPnSourceId;
278 return status;
281 NTSTATUS WINAPI wow64_NtGdiDdDDIQueryStatistics( UINT *args )
283 D3DKMT_QUERYSTATISTICS *stats = get_ptr( &args );
285 return NtGdiDdDDIQueryStatistics( stats );
288 NTSTATUS WINAPI wow64_NtGdiDdDDISetQueuedLimit( UINT *args )
290 D3DKMT_SETQUEUEDLIMIT *desc = get_ptr( &args );
292 return NtGdiDdDDISetQueuedLimit( desc );
295 NTSTATUS WINAPI wow64_NtGdiDeleteClientObj( UINT *args )
297 HGDIOBJ obj = get_handle( &args );
299 return NtGdiDeleteClientObj( obj );
302 NTSTATUS WINAPI wow64_NtGdiDescribePixelFormat( UINT *args )
304 HDC hdc = get_handle( &args );
305 INT format = get_ulong( &args );
306 UINT size = get_ulong( &args );
307 PIXELFORMATDESCRIPTOR *descr = get_ptr( &args );
309 return NtGdiDescribePixelFormat( hdc, format, size, descr );
312 NTSTATUS WINAPI wow64_NtGdiDrawStream( UINT *args )
314 HDC hdc = get_handle( &args );
315 ULONG in = get_ulong( &args );
316 void *pvin = get_ptr( &args );
318 return NtGdiDrawStream( hdc, in, pvin );
321 NTSTATUS WINAPI wow64_NtGdiEqualRgn( UINT *args )
323 HRGN hrgn1 = get_handle( &args );
324 HRGN hrgn2 = get_handle( &args );
326 return NtGdiEqualRgn( hrgn1, hrgn2 );
329 NTSTATUS WINAPI wow64_NtGdiExtCreatePen( UINT *args )
331 DWORD style = get_ulong( &args );
332 DWORD width = get_ulong( &args );
333 ULONG brush_style = get_ulong( &args );
334 ULONG color = get_ulong( &args );
335 ULONG_PTR client_hatch = get_ulong( &args );
336 ULONG_PTR hatch = get_ulong( &args );
337 DWORD style_count = get_ulong( &args );
338 const DWORD *style_bits = get_ptr( &args );
339 ULONG dib_size = get_ulong( &args );
340 BOOL old_style = get_ulong( &args );
341 HBRUSH brush = get_handle( &args );
343 return HandleToUlong( NtGdiExtCreatePen( style, width, brush_style, color, client_hatch,
344 hatch, style_count, style_bits, dib_size,
345 old_style, brush ));
348 NTSTATUS WINAPI wow64_NtGdiExtCreateRegion( UINT *args )
350 const XFORM *xform = get_ptr( &args );
351 DWORD count = get_ulong( &args );
352 const RGNDATA *data = get_ptr( &args );
354 return HandleToUlong( NtGdiExtCreateRegion( xform, count, data ));
357 NTSTATUS WINAPI wow64_NtGdiExtGetObjectW( UINT *args )
359 HGDIOBJ handle = get_handle( &args );
360 INT count = get_ulong( &args );
361 void *buffer = get_ptr( &args );
363 switch (gdi_handle_type( handle ))
365 case NTGDI_OBJ_BITMAP:
367 BITMAP32 *bitmap32 = buffer;
368 struct
370 BITMAP32 dsBm;
371 BITMAPINFOHEADER dsBmih;
372 DWORD dsBitfields[3];
373 ULONG dshSection;
374 DWORD dsOffset;
375 } *dib32 = buffer;
376 DIBSECTION dib;
377 int ret;
379 if (buffer)
381 if (count < sizeof(*bitmap32)) return 0;
382 count = count < sizeof(*dib32) ? sizeof(BITMAP) : sizeof(DIBSECTION);
385 if (!(ret = NtGdiExtGetObjectW( handle, count, buffer ? &dib : NULL ))) return 0;
387 if (bitmap32)
389 bitmap32->bmType = dib.dsBm.bmType;
390 bitmap32->bmWidth = dib.dsBm.bmWidth;
391 bitmap32->bmHeight = dib.dsBm.bmHeight;
392 bitmap32->bmWidthBytes = dib.dsBm.bmWidthBytes;
393 bitmap32->bmPlanes = dib.dsBm.bmPlanes;
394 bitmap32->bmBitsPixel = dib.dsBm.bmBitsPixel;
395 bitmap32->bmBits = PtrToUlong( dib.dsBm.bmBits );
397 if (ret != sizeof(dib)) return sizeof(*bitmap32);
399 if (dib32)
401 dib32->dsBmih = dib.dsBmih;
402 dib32->dsBitfields[0] = dib.dsBitfields[0];
403 dib32->dsBitfields[1] = dib.dsBitfields[1];
404 dib32->dsBitfields[2] = dib.dsBitfields[2];
405 dib32->dshSection = HandleToUlong( dib.dshSection );
406 dib32->dsOffset = dib.dsOffset;
408 return sizeof(*dib32);
411 case NTGDI_OBJ_PEN:
412 case NTGDI_OBJ_EXTPEN:
414 EXTLOGPEN32 *pen32 = buffer;
415 EXTLOGPEN *pen = NULL;
417 if (count == sizeof(LOGPEN) || (buffer && !HIWORD( buffer )))
418 return NtGdiExtGetObjectW( handle, count, buffer );
420 if (pen32 && count && !(pen = Wow64AllocateTemp( count + sizeof(ULONG) ))) return 0;
421 count = NtGdiExtGetObjectW( handle, count + sizeof(ULONG), pen );
423 if (count == sizeof(LOGPEN))
425 if (buffer) memcpy( buffer, pen, count );
427 else if (count)
429 if (pen32)
431 pen32->elpPenStyle = pen->elpPenStyle;
432 pen32->elpWidth = pen->elpWidth;
433 pen32->elpBrushStyle = pen->elpBrushStyle;
434 pen32->elpColor = pen->elpColor;
435 pen32->elpHatch = pen->elpHatch;
436 pen32->elpNumEntries = pen->elpNumEntries;
438 count -= FIELD_OFFSET( EXTLOGPEN, elpStyleEntry );
439 if (count && pen32) memcpy( pen32->elpStyleEntry, pen->elpStyleEntry, count );
440 count += FIELD_OFFSET( EXTLOGPEN32, elpStyleEntry );
442 return count;
445 default:
446 return NtGdiExtGetObjectW( handle, count, buffer );
450 NTSTATUS WINAPI wow64_NtGdiFlattenPath( UINT *args )
452 HDC hdc = get_handle( &args );
454 return NtGdiFlattenPath( hdc );
457 NTSTATUS WINAPI wow64_NtGdiFlush( UINT *args )
459 return NtGdiFlush();
462 NTSTATUS WINAPI wow64_NtGdiGetBitmapBits( UINT *args )
464 HBITMAP bitmap = get_handle( &args );
465 LONG count = get_ulong( &args );
466 void *bits = get_ptr( &args );
468 return NtGdiGetBitmapBits( bitmap, count, bits );
471 NTSTATUS WINAPI wow64_NtGdiGetBitmapDimension( UINT *args )
473 HBITMAP bitmap = get_handle( &args );
474 SIZE *size = get_ptr( &args );
476 return NtGdiGetBitmapDimension( bitmap, size );
479 NTSTATUS WINAPI wow64_NtGdiGetColorAdjustment( UINT *args )
481 HDC hdc = get_handle( &args );
482 COLORADJUSTMENT *ca = get_ptr( &args );
484 return NtGdiGetColorAdjustment( hdc, ca );
487 NTSTATUS WINAPI wow64_NtGdiGetDCDword( UINT *args )
489 HDC hdc = get_handle( &args );
490 UINT method = get_ulong( &args );
491 DWORD *result = get_ptr( &args );
493 return NtGdiGetDCDword( hdc, method, result );
496 NTSTATUS WINAPI wow64_NtGdiGetDCObject( UINT *args )
498 HDC hdc = get_handle( &args );
499 UINT type = get_ulong( &args );
501 return HandleToUlong( NtGdiGetDCObject( hdc, type ));
504 NTSTATUS WINAPI wow64_NtGdiGetDCPoint( UINT *args )
506 HDC hdc = get_handle( &args );
507 UINT method = get_ulong( &args );
508 POINT *result = get_ptr( &args );
510 return NtGdiGetDCPoint( hdc, method, result );
513 NTSTATUS WINAPI wow64_NtGdiGetFontFileData( UINT *args )
515 DWORD instance_id = get_ulong( &args );
516 DWORD file_index = get_ulong( &args );
517 UINT64 *offset = get_ptr( &args );
518 void *buff = get_ptr( &args );
519 DWORD buff_size = get_ulong( &args );
521 return NtGdiGetFontFileData( instance_id, file_index, offset, buff, buff_size );
524 NTSTATUS WINAPI wow64_NtGdiGetFontFileInfo( UINT *args )
526 DWORD instance_id = get_ulong( &args );
527 DWORD file_index = get_ulong( &args );
528 struct font_fileinfo *info = get_ptr( &args );
529 SIZE_T size = get_ulong( &args );
530 ULONG *needed32 = get_ptr( &args );
532 SIZE_T needed;
533 BOOL ret;
535 ret = NtGdiGetFontFileInfo( instance_id, file_index, info, size, size_32to64( &needed, needed32 ));
536 put_size( needed32, needed );
537 return ret;
540 NTSTATUS WINAPI wow64_NtGdiGetNearestPaletteIndex( UINT *args )
542 HPALETTE hpalette = get_handle( &args );
543 COLORREF color = get_ulong( &args );
545 return NtGdiGetNearestPaletteIndex( hpalette, color );
548 NTSTATUS WINAPI wow64_NtGdiGetPath( UINT *args )
550 HDC hdc = get_handle( &args );
551 POINT *points = get_ptr( &args );
552 BYTE *types = get_ptr( &args );
553 INT size = get_ulong( &args );
555 return NtGdiGetPath( hdc, points, types, size );
558 NTSTATUS WINAPI wow64_NtGdiGetRegionData( UINT *args )
560 HRGN hrgn = get_ptr( &args );
561 DWORD count = get_ulong( &args );
562 RGNDATA *data = get_ptr( &args );
564 return NtGdiGetRegionData( hrgn, count, data );
567 NTSTATUS WINAPI wow64_NtGdiGetRgnBox( UINT *args )
569 HRGN hrgn = get_handle( &args );
570 RECT *rect = get_ptr( &args );
572 return NtGdiGetRgnBox( hrgn, rect );
575 NTSTATUS WINAPI wow64_NtGdiGetSpoolMessage( UINT *args )
577 void *ptr1 = get_ptr( &args );
578 DWORD data2 = get_ulong( &args );
579 void *ptr3 = get_ptr( &args );
580 DWORD data4 = get_ulong( &args );
582 return NtGdiGetSpoolMessage( ptr1, data2, ptr3, data4 );
585 NTSTATUS WINAPI wow64_NtGdiGetSystemPaletteUse( UINT *args )
587 HDC hdc = get_handle( &args );
589 return NtGdiGetSystemPaletteUse( hdc );
592 NTSTATUS WINAPI wow64_NtGdiGetTransform( UINT *args )
594 HDC hdc = get_handle( &args );
595 DWORD which = get_ulong( &args );
596 XFORM *xform = get_ptr( &args );
598 return NtGdiGetTransform( hdc, which, xform );
601 NTSTATUS WINAPI wow64_NtGdiHfontCreate( UINT *args )
603 const void *logfont = get_ptr( &args );
604 ULONG unk2 = get_ulong( &args );
605 ULONG unk3 = get_ulong( &args );
606 ULONG unk4 = get_ulong( &args );
607 void *data = get_ptr( &args );
609 return HandleToUlong( NtGdiHfontCreate( logfont, unk2, unk3, unk4, data ));
612 NTSTATUS WINAPI wow64_NtGdiInitSpool( UINT *args )
614 return NtGdiInitSpool();
617 NTSTATUS WINAPI wow64_NtGdiOffsetRgn( UINT *args )
619 HRGN hrgn = get_handle( &args );
620 INT x = get_ulong( &args );
621 INT y = get_ulong( &args );
623 return NtGdiOffsetRgn( hrgn, x, y );
626 NTSTATUS WINAPI wow64_NtGdiPathToRegion( UINT *args )
628 HDC hdc = get_handle( &args );
630 return HandleToUlong( NtGdiPathToRegion( hdc ));
633 NTSTATUS WINAPI wow64_NtGdiPtInRegion( UINT *args )
635 HRGN hrgn = get_handle( &args );
636 INT x = get_ulong( &args );
637 INT y = get_ulong( &args );
639 return NtGdiPtInRegion( hrgn, x, y );
642 NTSTATUS WINAPI wow64_NtGdiRectInRegion( UINT *args )
644 HRGN hrgn = get_handle( &args );
645 const RECT *rect = get_ptr( &args );
647 return NtGdiRectInRegion( hrgn, rect );
650 NTSTATUS WINAPI wow64_NtGdiRemoveFontMemResourceEx( UINT *args )
652 HANDLE handle = get_handle( &args );
654 return NtGdiRemoveFontMemResourceEx( handle );
657 NTSTATUS WINAPI wow64_NtGdiRemoveFontResourceW( UINT *args )
659 const WCHAR *str = get_ptr( &args );
660 ULONG size = get_ulong( &args );
661 ULONG files = get_ulong( &args );
662 DWORD flags = get_ulong( &args );
663 DWORD tid = get_ulong( &args );
664 void *dv = get_ptr( &args );
666 return NtGdiRemoveFontResourceW( str, size, files, flags, tid, dv );
669 NTSTATUS WINAPI wow64_NtGdiSaveDC( UINT *args )
671 HDC hdc = get_handle( &args );
673 return NtGdiSaveDC( hdc );
676 NTSTATUS WINAPI wow64_NtGdiSetBitmapBits( UINT *args )
678 HBITMAP hbitmap = get_handle( &args );
679 LONG count = get_ulong( &args );
680 const void *bits = get_ptr( &args );
682 return NtGdiSetBitmapBits( hbitmap, count, bits );
685 NTSTATUS WINAPI wow64_NtGdiSetBitmapDimension( UINT *args )
687 HBITMAP hbitmap = get_handle( &args );
688 INT x = get_ulong( &args );
689 INT y = get_ulong( &args );
690 SIZE *prev_size = get_ptr( &args );
692 return NtGdiSetBitmapDimension( hbitmap, x, y, prev_size );
695 NTSTATUS WINAPI wow64_NtGdiSetBrushOrg( UINT *args )
697 HDC hdc = get_handle( &args );
698 INT x = get_ulong( &args );
699 INT y = get_ulong( &args );
700 POINT *prev_org = get_ptr( &args );
702 return NtGdiSetBrushOrg( hdc, x, y, prev_org );
705 NTSTATUS WINAPI wow64_NtGdiSetColorAdjustment( UINT *args )
707 HDC hdc = get_handle( &args );
708 const COLORADJUSTMENT *ca = get_ptr( &args );
710 return NtGdiSetColorAdjustment( hdc, ca );
713 NTSTATUS WINAPI wow64_NtGdiSetMagicColors( UINT *args )
715 HDC hdc = get_handle( &args );
716 DWORD magic = get_ulong( &args );
717 ULONG index = get_ulong( &args );
719 return NtGdiSetMagicColors( hdc, magic, index );
722 NTSTATUS WINAPI wow64_NtGdiSetMetaRgn( UINT *args )
724 HDC hdc = get_handle( &args );
726 return NtGdiSetMetaRgn( hdc );
729 NTSTATUS WINAPI wow64_NtGdiSetPixelFormat( UINT *args )
731 HDC hdc = get_handle( &args );
732 INT format = get_ulong( &args );
734 return NtGdiSetPixelFormat( hdc, format );
737 NTSTATUS WINAPI wow64_NtGdiSetRectRgn( UINT *args )
739 HRGN hrgn = get_handle( &args );
740 INT left = get_ulong( &args );
741 INT top = get_ulong( &args );
742 INT right = get_ulong( &args );
743 INT bottom = get_ulong( &args );
745 return NtGdiSetRectRgn( hrgn, left, top, right, bottom );
748 NTSTATUS WINAPI wow64_NtGdiSetTextJustification( UINT *args )
750 HDC hdc = get_handle( &args );
751 INT extra = get_ulong( &args );
752 INT breaks = get_ulong( &args );
754 return NtGdiSetTextJustification( hdc, extra, breaks );
757 NTSTATUS WINAPI wow64_NtGdiSetVirtualResolution( UINT *args )
759 HDC hdc = get_handle( &args );
760 DWORD horz_res = get_ulong( &args );
761 DWORD vert_res = get_ulong( &args );
762 DWORD horz_size = get_ulong( &args );
763 DWORD vert_size = get_ulong( &args );
765 return NtGdiSetVirtualResolution( hdc, horz_res, vert_res, horz_size, vert_size );
768 NTSTATUS WINAPI wow64_NtGdiSwapBuffers( UINT *args )
770 HDC hdc = get_handle( &args );
772 return NtGdiSwapBuffers( hdc );
775 NTSTATUS WINAPI wow64_NtGdiTransformPoints( UINT *args )
777 HDC hdc = get_handle( &args );
778 const POINT *points_in = get_ptr( &args );
779 POINT *points_out = get_ptr( &args );
780 INT count = get_ulong( &args );
781 UINT mode = get_ulong( &args );
783 return NtGdiTransformPoints( hdc, points_in, points_out, count, mode );