Solved

DirectX Colors Failed!!!

Posted on 2000-04-11
4
535 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article describes how to programmatically preset the "Pages per Sheet" option that's available with most printer drivers.   This setting lets you do "n-Up" printing, where two, four, or more pages are printed on each sheet of paper. If your …
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
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…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

808 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