I run the following code to get the video display timeout:
It works on my Windows 7 but then on another laptop running Windows 7 as well it returns the error code STATUS_INVALID_PARAMETER. Does anyone have any idea why? And how to remedy it?Code:SYSTEM_POWER_POLICY spp = {0}; DWORD dwRes = CallNtPowerInformation(SystemPowerPolicyAc, NULL, 0, &spp, sizeof(spp)); if(dwRes != STATUS_SUCCESS) { //Error 0xC000000D or STATUS_INVALID_PARAMETER //An invalid parameter was passed to a service or function. } else { int nTimeout = spp.VideoTimeout; }




Reply With Quote