Click here to Skip to main content
15,915,160 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: encryption symetric Pin
3loka24-Apr-05 17:44
3loka24-Apr-05 17:44 
GeneralRe: encryption symetric Pin
Francesco Aruta17-Apr-05 23:57
Francesco Aruta17-Apr-05 23:57 
GeneralRe: encryption symetric Pin
3loka19-Apr-05 20:03
3loka19-Apr-05 20:03 
GeneralRe: encryption symetric Pin
Francesco Aruta20-Apr-05 9:54
Francesco Aruta20-Apr-05 9:54 
GeneralRe: encryption symetric Pin
3loka23-Apr-05 12:48
3loka23-Apr-05 12:48 
GeneralRe: encryption symetric Pin
3loka24-Apr-05 17:42
3loka24-Apr-05 17:42 
GeneralRe: encryption symetric Pin
3loka26-Apr-05 8:52
3loka26-Apr-05 8:52 
GeneralTrying to wake up !! Pin
Still learning how to code16-Apr-05 2:09
Still learning how to code16-Apr-05 2:09 
Hi, I'm writing an app in which I want to suspend the PC and then wake up sometime later. Having trouble with the wake up (it doesn't happen !!)
My test code is as follows:-

LARGE_INTEGER liDueTime;
HANDLE hWaitTimer;
hWaitTimer = CreateWaitableTimer(NULL,FALSE,"Test timer");

liDueTime.QuadPart=-1200000000; // 2 minutes;

BOOL rc = SetWaitableTimer(hWaitTimer,&liDueTime,0,
pTimerProc,NULL,TRUE);

rc = SetSystemPowerState(NULL,TRUE); // 2nd parm is Resume
DWORD dwError;
if(rc == 0)
dwError = GetLastError();
// WAIT HERE !!!
if (WaitForSingleObject(hWaitTimer, INFINITE) != WAIT_OBJECT_0)
{
printf("WaitForSingleObject failed (%d)\n", GetLastError());
return 3;
}
else
{
printf("Timer was signaled.\n");
return 100;
}

I have run the code with the SetSystemPowerState() commented out, and the timer signals O.K. So any idea about why it won't wake up ? (Tried it on Win2000 and Win98 (needed ultimately for the later) Thanks !

Doug
GeneralRe: Trying to wake up !! Pin
22491716-Apr-05 2:37
22491716-Apr-05 2:37 
GeneralRe: Trying to wake up !! Pin
Still learning how to code16-Apr-05 5:27
Still learning how to code16-Apr-05 5:27 
GeneralRe: Trying to wake up !! Pin
Alexander M.,16-Apr-05 11:22
Alexander M.,16-Apr-05 11:22 
GeneralRe: Trying to wake up !! Pin
Still learning how to code16-Apr-05 11:36
Still learning how to code16-Apr-05 11:36 
GeneralRe: Trying to wake up !! Pin
Alexander M.,16-Apr-05 11:51
Alexander M.,16-Apr-05 11:51 
GeneralRe: Trying to wake up !! Pin
Still learning how to code17-Apr-05 5:07
Still learning how to code17-Apr-05 5:07 
GeneralRequest for testing new secure edit control Pin
Dominik Reichl16-Apr-05 1:35
Dominik Reichl16-Apr-05 1:35 
GeneralRe: Request for testing new secure edit control Pin
Alexander M.,16-Apr-05 2:45
Alexander M.,16-Apr-05 2:45 
GeneralRe: Request for testing new secure edit control Pin
Dominik Reichl16-Apr-05 3:12
Dominik Reichl16-Apr-05 3:12 
GeneralRe: Request for testing new secure edit control Pin
Alexander M.,16-Apr-05 10:42
Alexander M.,16-Apr-05 10:42 
QuestionTaskBar Icon Problem??????????? Pin
ddmcr16-Apr-05 1:04
ddmcr16-Apr-05 1:04 
AnswerRe: TaskBar Icon Problem??????????? Pin
ThatsAlok16-Apr-05 1:27
ThatsAlok16-Apr-05 1:27 
GeneralRe: TaskBar Icon Problem??????????? Pin
ddmcr16-Apr-05 1:55
ddmcr16-Apr-05 1:55 
GeneralRe: TaskBar Icon Problem??????????? Pin
ThatsAlok16-Apr-05 2:29
ThatsAlok16-Apr-05 2:29 
GeneralRe: TaskBar Icon Problem??????????? Pin
ThatsAlok17-Apr-05 19:08
ThatsAlok17-Apr-05 19:08 
AnswerRe: TaskBar Icon Problem??????????? Pin
Alexander M.,16-Apr-05 2:40
Alexander M.,16-Apr-05 2:40 
GeneralRe: TaskBar Icon Problem??????????? Pin
ddmcr16-Apr-05 3:38
ddmcr16-Apr-05 3:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.