N
naveenadevi
Hi,
I'm trying to use some power management features with windowsx xp
and I have visual studio .net 2003 installed.
As per documentation of ACPI, you can
use the power options by including the Powrprof.h file and use the
Powrprof.lib file in your project, which I did, but when I build, it
compiles fine but I get this Link error.. :
error LNK2019: unresolved external symbol "long __stdcall
CallNtPowerInformation(enum POWER_INFORMATION_LEVE,void*,usigned
long,void*,unsignedlong)"
(?CallNtPowerInformation@@YGJW4POWER_INFORMATION_LEVEL@@PAXK1K@Z)
referenced in
function _main
fatal error LNK1120: 1 unresolved externals
The code is as shown below :...
Any Ideas on what I'm missing here... please help...
Thanks,
Regards,
AS.
#include "stdafx.h"
#include <windows.h>
#include <stdio.h>
#include <lmaccess.h>
#include <powrprof.h>
int _tmain(int argc, _TCHAR* argv[])
{
SYSTEM_POWER_CAPABILITIES cap;
NTSTATUS status;
status = CallNtPowerInformation(
SystemPowerCapabilities,
NULL,
0,
&cap,
sizeof(cap));
return 0;
}
I'm trying to use some power management features with windowsx xp
and I have visual studio .net 2003 installed.
As per documentation of ACPI, you can
use the power options by including the Powrprof.h file and use the
Powrprof.lib file in your project, which I did, but when I build, it
compiles fine but I get this Link error.. :
error LNK2019: unresolved external symbol "long __stdcall
CallNtPowerInformation(enum POWER_INFORMATION_LEVE,void*,usigned
long,void*,unsignedlong)"
(?CallNtPowerInformation@@YGJW4POWER_INFORMATION_LEVEL@@PAXK1K@Z)
referenced in
function _main
fatal error LNK1120: 1 unresolved externals
The code is as shown below :...
Any Ideas on what I'm missing here... please help...
Thanks,
Regards,
AS.
#include "stdafx.h"
#include <windows.h>
#include <stdio.h>
#include <lmaccess.h>
#include <powrprof.h>
int _tmain(int argc, _TCHAR* argv[])
{
SYSTEM_POWER_CAPABILITIES cap;
NTSTATUS status;
status = CallNtPowerInformation(
SystemPowerCapabilities,
NULL,
0,
&cap,
sizeof(cap));
return 0;
}