erichood

erichood

  • NA
  • 9
  • 0

DirectDraw --> GetPalette().GetEntries() help?

Nov 19 2004 4:03 PM
Anybody have an example of how to use the GetEntries(int start, int count, ref System.Array val) function of the DirectDrawPalette class? I've tried the following: (256-color mode, fullscreen) PALETTEENTRY[] entries = new PALETTEENTRY[256]; System.Array val = (Array)entries; (p is a DirectDrawSurface7.DirectDrawPalette object) p.GetEntries(0,256, ref val); But it errors out on the last line as: "Element not found." I've tried it as (1,256,...) thinking maybe my start index was off, but no good. I've tried it as (1,1,...) to just try and get one entry. No good. Any help? I've spent over an hour on google trying to find an answer, but got nowhere. Thanks in advance, --Eric