How can I get all 256 colours in Windows 7?

In Vista, it was impossible to access all 256 colours in full screen mode using the windib driver, presumably because Vista doesn’t allow SetSystemPaletteUse (http://msdn.microsoft.com/en-us/library/dd145090(VS.85).aspx)(hdc, SYSPAL_NOSTATIC256). Because of this, some colours get remapped onto other colours, leading to small inaccuracies in the image. It was still possible to access all 256 colours using the directx driver.

In Windows 7, even the directx driver cannot normally access all 256 colours. If I switch into full screen mode in the usual way, some colours are reset to standard system colours, leading to major errors in the image. If I shut down SDL and restart it, then there is just some colour remapping (similar to the windib driver) which leads to small inaccuracies. The only workaround I know of is killing explorer.exe or suspending the only thread in the Explorer process which is in explorer.exe. Messing with Explorer like this doesn’t seem like a very good workaround.

This problem exists in programs I work on and in DOSBox (http://www.dosbox.com/). (In DOSBox, I solved the problem by setting “output=openglnb” in the config file.) I’m using SDL 1.2.14.