8bit RGB-332 support on Primary Display Device

Hello Every One,
I am writing a display driver for Windows 2000 and
currently using the permedia2 sample display driver (that comes with Windows
DDK 2000) as my starting point. I have almost completed my development, but
there is one issue which I find difficult to handle i.e supporting 8bit
RGB-332 mode on the primary display. I have made all the modifications in
the code which are required to suport this mode, but when i run it on 8bit
mode as a primary device, it does not work and crashes. I have debugged it
and found that the error is not in my driver code, but actually this crash
is in the kernel (the Error is Access Violation error while trying to copy
some thing) i.e the system crashes.

Two things which are working fine are:
If I support 8bit palette mode, then it works perfect. There is no error.
If I made my device secondary in a multiple display device system and then
run it on 8bit RGB 332 mode. It works fine.

So here is the question:
“Is there any restriction that window does not support 8bit RGB 332, on the
primary device. As this 8bit RGB 332 mode works fine when I make my device
secondary. Actually I want to clear that whether it is the windows
limitation or it is due to some bug in my code. If there is any limitation,
please let me know. Also If any one of you have supported it, then please
tell me what is the extra work which i have to do to make it work on primary

Muhammad Asif Fayyaz
Design Engineer.