Using DPMS to turn off monitor

We need a library that:

1. Works on Win2k/XP. (Support for NT4 and 9x/Me is optional.)

2. Has three exported functions:

DWORD DPMSQuerySupport()

Returns a DWORD value containing a bit mask that describes which DPMS states the primary monitor supports. The typical states are: On, Standby, Suspend, Off, Reduced Power.


Returns the DPMS status of the display on the primary monitor.

DPMSSetState(DWORD dwState)

Sets the DPMS status on the primary monitor to one of the supported states.

3. Important! Potential user input (mouse movements, etc) should not cause the OS to reset the DPMS status to On. (The obvious WM_SYSCOMMAND wParam = SC_MONITORPOWER call, while sets the DPMS status to the value of lParam has this problem.) The DPMS status set using the library must remain the same until the library is used to change it. Obvious exceptions from this rule can be accepted only if the OS interferes with the DPMS status when changing the video mode, putting the display into low-power mode due to user inactivity, etc.

4. Pointers:

From DOS, one could just issue an int 10h with AX=4f10h, and BL being 0, 1 or 2 for one of the above three functions. This obviously does not work in NT/2K/XP.

In NT4, you can call VideoPortInt10 from a kernel driver to achieve the goal. Unfortunately VideoPortInt10 calls in 2K/XP are restricted to video miniport drivers, and cause a bluescreen if called from a plain kernel driver.

One could think of sending IOCTL_VIDEO_SET_POWER_MANAGEMENT and similar calls to \\??\\DISPLAY1 or \Device\Video0, but the problem with this is that these devices are opened exclusively by the system and trying to call CreateFile() from user mode or ZwCreateFile() from kernel mode will fail with Access Denied.

We realize and accept the fact that solving this problem will probably require the use of undocumented features such as somehow duplicating the handle the system has opened on \\??\\DISPLAY1, or other nonorthodox methods.

## Deliverables

1) Complete and fully-functional library and a test/demo program in executable form as well as complete source code of all work done.

4) Complete ownership and distribution copyrights to all work purchased.

## Platform

Required support for:

Windows 2000

Windows XP

Windows 2003 Server

Would like to optionallys support:


Windows 95/98

Windows ME

Habilidades: Montagem, Programação C, Engenharia, Microsoft, MySQL, PHP, Arquitetura de software, Teste de Software, Área de trabalho do Windows

Veja mais: zwcreatefile display1, work in nt, with monitor, video bl, system monitor 1.1, programming pointers, programming monitor, programming and problem solving with c++, pointers in c programming, pointers c programming, php programming problem set, int power, goal programming, dos programming, c programming power, c programming pointers, set dpms windows, windows power user, Windows Kernel, turn by turn, problem solving and programming, off, kernel driver, Device Drivers, bl

Acerca do Empregador:
( 4 comentários ) Hungary

ID do Projeto: #2959530

Concedido a:


See private message.

$331.5 USD em 10 dias
(130 Comentários)

2 freelancers estão ofertando em média $378 para esse trabalho


See private message.

$425 USD in 10 dias
(1 Comentário)