ULONG flags;
DWORD dwPeridic;
if(blnPeriodic==true)
{
flags = WT_EXECUTEDEFAULT;
dwPeridic=(DWORD)intInterval;
}
else
{
flags = WT_EXECUTEDEFAULT | WT_EXECUTEONLYONCE;
dwPeridic=0;
}
WT_SET_MAX_THREADPOOL_THREADS(flags,500);
Why not use the macro that actually exists, the way the documentation describes? The error you were getting is because the first parameter to the macro must be an assignable expression (an lvalue). Why do you need up to 500 threads to service your timer callbacks in the first place?
I have no idea what your (1) is asking.
As for your (2)... SetTimer() and KillTimer() deliver timer events as WM_EVENT events, and require a window handle. CreateTimerQueueTimer lets you specify arbitrary callback functions and callback parameters instead. AFAIK this design decision has nothing to do with the periodicity or precision of the timers associated with them.