如何获取PPC当前的背光状态?
http://blog.csdn.net/fumingxia19/archive/2007/04/18/1569643.aspx这里有讲不通过注册表获取和设置背光等级,但为什么我在多普达手机上实验的时候
int GetBackLightLevel()
{
int iRet = -1;
DWORD dwOut,dwRet;
HANDLE h = CreateFile(TEXT("BKL1:"), GENERIC_READ|GENERIC_WRITE, 0,0,
OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL, 0);
if (h != INVALID_HANDLE_VALUE)
{
if ( DeviceIoControl(h, 1 , 0, 0, &dwOut, sizeof(DWORD), &dwRet, 0))
{
iRet = dwOut;
}
CloseHandle(h);
}
return iRet;
}
DeviceIoControl不成功呢,GetLastError=32
谁帮我解决下.
补充:移动开发 , Windows Phone