Question : Calling KillTimer() from a CALLBACK function

I call the ::KillTimer() from a CALLBACK function.  I tried two different parameter types for ::KillTimer() as shown below.  Both cases of ::KillTimer() return a non-zero value.  I guess it means the timer was destroyed, right?  Which case of parameters are correct?

g_idEvent = ::SetTimer(NULL, NULL, 1*1000, (TIMERPROC)D2DTimerCB);

void CALLBACK D2DTimerCB(HWND hwnd, UINT uMsg,UINT_PTR idEvent, DWORD dwTime)
{
    (case 1) int uResult = ::KillTimer(hwnd, (int)idEvent);
    (case 2) int uResult = ::KillTimer(NULL, g_idEvent);
    ...
}

Answer : Calling KillTimer() from a CALLBACK function

Ok, not sure if this is the best or most common practice, but this is what I use.

In each users profile, they are forced to run netdrive.bat which includes:

@ECHO OFF
CLS
ECHO.
ECHO.
ECHO Please wait while I connect to the file server...
ECHO.
ECHO.
NET USE X: /delete /y
NET USE U: /delete /y
NET USE X: \\bcrsfs1\COMMONSHARE
NET USE U: \\bcrsfs1\CHIEFSHARE
ECHO.
ECHO.
ECHO Starting User Agreement and Message Of The Day
ECHO.
ECHO.
start iexplore http://bcrsfs1:8080
ECHO.
ECHO.
ECHO All Done!  Have a wonderful day.
Random Solutions  
 
programming4us programming4us