A
AS
Hi All,
I'm trying to write an Appln. for XPe that would enable me to put the system
into suspend mode...
I'm using Visual Studio .NET 2003 with the latest service packs and
everything on my Win2K development system.. As per documentation, one
should include the Powrprof.h and the Powrprof.lib in the application and
call the system functions for power mgmt. as given in
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/power/base/ispwrsuspendallowed.asp
... Here's a sample of my appln.
/********************************/
#include "stdafx.h"
#include "windows.h"
#include "powrprof.h" /** powrprof.lib included in link options */
#define TRUE 1
int _tmain(int argc, _TCHAR* argv[])
{
printf("Checking for the system sleep\n");
if ( IsPwrSuspendAllowed () == TRUE)
{
printf("Suspend state is allowed\n");
}
else
{
printf("Suspend state is NOT allowed\n");
return 0;
}
return 0;
}
/***************************/
Now this compiles fine, but I always get the following error during
linking..
error LNK2019: unresolved external symbol "unsigned char __stdcall
IsPwrSuspendAllowed(void)" (?IsPwrSuspendAllowed@@YGEXZ) referenced in
function _main
Am I missing something here... I'd appreciate any help on this...
Thanks,
Regards,
I'm trying to write an Appln. for XPe that would enable me to put the system
into suspend mode...
I'm using Visual Studio .NET 2003 with the latest service packs and
everything on my Win2K development system.. As per documentation, one
should include the Powrprof.h and the Powrprof.lib in the application and
call the system functions for power mgmt. as given in
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/power/base/ispwrsuspendallowed.asp
... Here's a sample of my appln.
/********************************/
#include "stdafx.h"
#include "windows.h"
#include "powrprof.h" /** powrprof.lib included in link options */
#define TRUE 1
int _tmain(int argc, _TCHAR* argv[])
{
printf("Checking for the system sleep\n");
if ( IsPwrSuspendAllowed () == TRUE)
{
printf("Suspend state is allowed\n");
}
else
{
printf("Suspend state is NOT allowed\n");
return 0;
}
return 0;
}
/***************************/
Now this compiles fine, but I always get the following error during
linking..
error LNK2019: unresolved external symbol "unsigned char __stdcall
IsPwrSuspendAllowed(void)" (?IsPwrSuspendAllowed@@YGEXZ) referenced in
function _main
Am I missing something here... I'd appreciate any help on this...
Thanks,
Regards,