Solved

DirectX Colors Failed!!!

Posted on 2000-04-11
4
523 Views
Last Modified: 2013-12-03
I tried to query the primary surface for DirectDraw ColorControls:

LPDIRECTDRAWCOLORCONTROL lpColorControl;
LPDIRECTDRAWSURFACE7 lpPrimary;

lpPrimary->QueryInterface(IID_IDirectDrawCOlorControl, (VOID**)&lpColorControl);

So my error is that the query interface fails! meaning there is no interface...
How is that possible when it is a omnipresent capability in each video card?
0
Comment
Question by:volcano79
  • 2
4 Comments
 
LVL 3

Expert Comment

by:GlennDean
ID: 2706609
I would get the HRESULT return code from QI and then use FormatMessage to see exactly why it failed.
   Glenn
0
 
LVL 4

Accepted Solution

by:
nils pipenbrinck earned 10 total points
ID: 2707485
your code is correct.

your driver simply doesn't implement this feature.. even if your vga might support the stuff.

So.. bad luck for you.

(btw. I wonder how a vga card should implement the saturation/hue settings.. that sound like a lot of video postprocessing for me).

Nils

P.S. 10 point question, 10 point answer :)
0
 

Author Comment

by:volcano79
ID: 2710506
My card is RIVA TNT, generation one, with nVidia chip in it. Hence, my driver is also nVidia one. And I suppose it is a reputable one to include such a feature inside? Could it be the card's problem rather than the driver problem?
0
 
LVL 4

Expert Comment

by:nils pipenbrinck
ID: 2711884
I also have a RIVA TNT in my machine at home (and a TNT2 here at the office). The drivers are great. They support most of the DirectX and Direct3D features, but not all.

Gamma and Color Control are two of them. Other features that are not supported are for example DDraw Blitting with Win32 ROP operations and other rarely used stuff.

Again.. I'm pretty sure that your code would work if your driver would support the ColorControl interface. The TNT hardware however is not able to change the hue or saturation of the output signal... Gamma is theoretical possible because the gdi drivers support it.

Nils
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now