g_UserSessionID = 0;
VOID CALLBACK OnTimerProc(HWND hwnd,UINT uMsg,UINT_PTR idEvent,DWORD dwTime)
{
/*****if session changed then reload OSD process******/
CurrentSessionID = WTSGetActiveConsoleSessionId();
if ((CurrentSessionID > 0) && (CurrentSessionID != g_UserSessionID))
{
Log_Message(_T("Session changed"));
g_UserSessionID = CurrentSessionID;
}
/*****************************************************/
}
SetTimer(NULL, 1, Timer_Interval, (TIMERPROC)OnTimerProc);