reactos/modules/rostests/apitests/win32nt/ntgdi/NtGdiEngCreatePalette.c
Serge Gautherie a5c3bb5bce
[WIN32KNT_APITEST] 2 minor code improvements and a first fix (#5980)
- Update .rc filename; addendum to 7ad21a4 (r70458).
- Move one '#include "resource.h"' around to where it is needed.
  Addendum to e1b2e7a (r29284) then ec5e0ea (r48103).
- Adjust all '#include <win32nt.h>'
2023-11-16 21:57:10 +01:00

26 lines
818 B
C

/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtGdiEngCreatePalette
* PROGRAMMERS:
*/
#include "../win32nt.h"
START_TEST(NtGdiEngCreatePalette)
{
HPALETTE hPal;
ULONG Colors[3] = {1,2,3};
PENTRY pEntry;
hPal = NtGdiEngCreatePalette(PAL_RGB, 3, Colors, 0xff000000, 0x00ff0000, 0x0000ff00);
ok(hPal != NULL, "hPal was NULL.\n");
ok_int((int)GDI_HANDLE_GET_TYPE(hPal), (int)GDI_OBJECT_TYPE_PALETTE);
pEntry = &GdiHandleTable[GDI_HANDLE_GET_INDEX(hPal)];
ok(pEntry->einfo.pobj != NULL, "pEntry->einfo.pobj was NULL.\n");
ok_long(pEntry->ObjectOwner.ulObj, GetCurrentProcessId());
ok_ptr(pEntry->pUser, NULL);
//TEST(pEntry->Type == (((UINT)hPal >> 16) | GDI_OBJECT_TYPE_PALETTE));
}