Moved Select/RealizePalette implementation to USER and use pfnSelect/RealizePalette function pointers in GDI. Make sure the palette handle is valid in GDISelectPalette16 (thanks to Uwe Bonnes).