A
AS
Hi,
I'm trying to use some power management features with windows 2000
Professional and I have visual studio .net 2003 installed with the latest
service packs and everything... I want to write a simple app to turn the
system into sleep mode/suspend mode. 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 "unsigned char __stdcall
IsPwrSuspendAllowed(void)" (?IsPwrSuspendAllowed@@YGEXZ) 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 "Powrprof.h"
int _tmain(int argc, _TCHAR* argv[]) {
if (isPwrSuspendAllowed() == TRUE) {
printf("Suspend state is allowed\n");
}
else {
printf("Suspend state is NOT allowed\n");
}
return 0;
}
/************************************/
I'm trying to use some power management features with windows 2000
Professional and I have visual studio .net 2003 installed with the latest
service packs and everything... I want to write a simple app to turn the
system into sleep mode/suspend mode. 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 "unsigned char __stdcall
IsPwrSuspendAllowed(void)" (?IsPwrSuspendAllowed@@YGEXZ) 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 "Powrprof.h"
int _tmain(int argc, _TCHAR* argv[]) {
if (isPwrSuspendAllowed() == TRUE) {
printf("Suspend state is allowed\n");
}
else {
printf("Suspend state is NOT allowed\n");
}
return 0;
}
/************************************/