Click here to Skip to main content
15,891,423 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralSoftware routing... Pin
Shashidhar Kamath12-Feb-04 11:25
Shashidhar Kamath12-Feb-04 11:25 
GeneralRe: Software routing... Pin
valikac12-Feb-04 12:13
valikac12-Feb-04 12:13 
GeneralRe: Software routing... Pin
Shashidhar Kamath12-Feb-04 12:24
Shashidhar Kamath12-Feb-04 12:24 
GeneralRe: Software routing... Pin
22491712-Feb-04 16:39
22491712-Feb-04 16:39 
GeneralRe: Software routing... Pin
Shashidhar Kamath13-Feb-04 7:08
Shashidhar Kamath13-Feb-04 7:08 
GeneralRe: Software routing... Pin
22491713-Feb-04 18:03
22491713-Feb-04 18:03 
GeneralRe: Software routing... Pin
Shashidhar Kamath17-Feb-04 7:02
Shashidhar Kamath17-Feb-04 7:02 
GeneralWaitableTimer Question Please help Pin
msrajan12-Feb-04 10:20
msrajan12-Feb-04 10:20 
Hello,
I am trying to use the waitable timer in a MFC project and using MsgWaitForMultipleObjectsEx() to wait
on the timer handle. But my timer callback doesnot get executed. Below is the source code with all
the error checking removed. Please help me to fix this problem.

OS Version: Windows 2000
VC Version: 6.0

//Globals
int wLoopCount= 0;

void CTimerTestDlg::OnStartTimer()
{
HANDLE hTimer[1];
LARGE_INTEGER liDueTime;
int breakLoop = 0;
int retVal = 0;

// Create waitable timer
hTimer[0] = CreateWaitableTimer(NULL, TRUE, "WaitableTimer");
// start the timer 5 sec from now and tick every 2 sec
liDueTime.QuadPart = -50000000;
SetWaitableTimer(hTimer[0], &liDueTime, 2000, TimerProc, NULL, 0);

wLoopCount = 0;
while (breakLoop == 0) {
retVal = MsgWaitForMultipleObjectsEx(1, hTimer, INFINITE, QS_ALLEVENTS, MWMO_ALERTABLE );
switch (retVal) {
case WAIT_OBJECT_0:
if (wLoopCount == 100) {
CancelWaitableTimer(hTimer[0]);
breakLoop = 1;
}
break;
}
}

CloseHandle (hTimer[0]);
return;
}

VOID CALLBACK TimerProc(LPVOID lpArg, DWORD dwTimerLowValue, DWORD dwTimerHighValue)
{
wLoopCount++;
}


GeneralRe: WaitableTimer Question Please help Pin
valikac12-Feb-04 12:19
valikac12-Feb-04 12:19 
QuestionActive X object security with CDHtmlDialog? Pin
Jim Howard12-Feb-04 9:35
Jim Howard12-Feb-04 9:35 
GeneralCListCtrl header alignment Pin
vancouver77712-Feb-04 9:01
vancouver77712-Feb-04 9:01 
Questionfprintf allowed in main dialog? Pin
rmnowick12-Feb-04 8:42
rmnowick12-Feb-04 8:42 
AnswerRe: fprintf allowed in main dialog? Pin
rmnowick12-Feb-04 9:19
rmnowick12-Feb-04 9:19 
GeneralRe: fprintf allowed in main dialog? Pin
David Crow13-Feb-04 4:02
David Crow13-Feb-04 4:02 
GeneralUpdating View from WinThread Pin
J Guds12-Feb-04 8:01
J Guds12-Feb-04 8:01 
GeneralRe: Updating View from WinThread Pin
David Crow12-Feb-04 8:16
David Crow12-Feb-04 8:16 
GeneralRe: Updating View from WinThread Pin
chifor13-Feb-04 4:07
chifor13-Feb-04 4:07 
GeneralMissing SysTray Icon in Win2k Pin
DazedAndConfused12-Feb-04 6:49
DazedAndConfused12-Feb-04 6:49 
GeneralRe: Missing SysTray Icon in Win2k Pin
DazedAndConfused12-Feb-04 8:00
DazedAndConfused12-Feb-04 8:00 
GeneralRe: Missing SysTray Icon in Win2k Pin
Anonymous12-Feb-04 8:30
Anonymous12-Feb-04 8:30 
GeneralVisual C++ to Web Pin
Cyrus Scott12-Feb-04 6:49
sussCyrus Scott12-Feb-04 6:49 
GeneralRe: Visual C++ to Web Pin
Jörgen Sigvardsson12-Feb-04 8:05
Jörgen Sigvardsson12-Feb-04 8:05 
GeneralRe: Visual C++ to Web Pin
basementman12-Feb-04 9:56
basementman12-Feb-04 9:56 
GeneralRe: Visual C++ to Web Pin
Jörgen Sigvardsson12-Feb-04 11:37
Jörgen Sigvardsson12-Feb-04 11:37 
QuestionHow to get Command Lines for a Dialog-based applications Pin
hongheo7612-Feb-04 6:09
hongheo7612-Feb-04 6:09 

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.