Click to Rate and Give Feedback
MSDN
MSDN Library
Windows Development
System Services
Power Management
 Backlight Control Interface
Backlight Control Interface

The backlight control interface is a standardized IOCTL interface for controlling the brightness of the LCD backlight.

Applications that require programmatic control of the backlight brightness or provide controls for the user to do so should use this interface rather than a proprietary interface; otherwise, the system cannot query the current hardware brightness and may become unsynchronized.

The first step is to query the device for the supported brightness using the IOCTL_VIDEO_QUERY_SUPPORTED_BRIGHTNESS control code. This operation returns a buffer that specifies the available brightness levels. Next, you can query the device for the current display brightness using the IOCTL_VIDEO_QUERY_DISPLAY_BRIGHTNESS control code. This operation returns the current settings for alternating current (AC) brightness, direct current (DC) brightness, and the power state.

To change the display brightness, use the IOCTL_VIDEO_SET_DISPLAY_BRIGHTNESS control code. You can set the AC brightness, the DC brightness, or both.

Related topics

About Power Management

 

 

Send comments about this topic to Microsoft

Build date: 2/7/2012

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Please help      chgle ... Carol Buchmiller - MSFT   |   Edit   |   Show History
[Please use the MSDN forums for questions. http://social.msdn.microsoft.com/Forums/en-US/category/windevgeneral]

Hi , I am want to develop a program to control the NoteBook backlight .
My NoteBool modle is ASUS A8jc .
System is WinXP SP3.
I am use Visual C++ 2005 .

I can find out the LCD device by QueryDosDevice(TEXT("LCD"), lpTargetPath, MAX_PATH-1);
And get the HANDLE by
hDevice = CreateFile(TEXT("\\\\.\\LCD") , // drive to open
0, // no access to the drive
FILE_SHARE_READ | // share mode
FILE_SHARE_WRITE,
NULL, // default security attributes
OPEN_EXISTING, // disposition
0, // file attributes
NULL); // do not copy file attributes
But when I try to get the brightness support list by DeviceIoControl() then return the error code "2 ERROR_FILE_NOT_FOUND" by GetLastError() .
Why QueryDosDevice() and CreateFile() are success to find out the LCD but DeviceIoControl() not ?
Below is my code , if possible please help to check it .
Much Thanks !

HANDLE hDevice ;
BOOL bResult ;
LPVOID lpOutBuffer[256] ;
DWORD lpBytesReturned ;
DWORD ErrorInfo_0 , ErrorInfo_1 ,ErrorInfo_2;
DWORD qResult ;
TCHAR lpTargetPath[MAX_PATH];

qResult = QueryDosDevice(TEXT("LCD"), lpTargetPath, MAX_PATH-1);

ErrorInfo_0 = GetLastError();

hDevice = CreateFile(TEXT("\\\\.\\LCD") , // drive to open
0, // no access to the drive
FILE_SHARE_READ | // share mode
FILE_SHARE_WRITE,
NULL, // default security attributes
OPEN_EXISTING, // disposition
0, // file attributes
NULL); // do not copy file attributes
ErrorInfo_1 = GetLastError();
bResult = DeviceIoControl(hDevice, // device to be queried
IOCTL_VIDEO_QUERY_SUPPORTED_BRIGHTNESS, // operation to perform
NULL, // lpInBuffer
0, // nInBufferSize
lpOutBuffer, // output buffer
sizeof(lpOutBuffer), // size of output buffer
&;;lpBytesReturned, // number of bytes returned
NULL // OVERLAPPED structure
);

ErrorInfo_2 = GetLastError();
CloseHandle(hDevice);

Tags What's this?: Add a tag
Flag as ContentBug
Processing
© 2012 Microsoft. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker