//获取EventServer的实例 IEventServer* IAppInterface::GetEventServer() { if(m_EventServer == NULL) { int32_t max_connexctions = GetMaxConnections(); m_EventServer = new EventServerEpoll(max_connexctions); } return m_EventServer; }
RET_VAL ConnectionLimit::IsPatched() { TCHAR windir[MAX_PATH]; GetWindowsDirectory(windir, MAX_PATH); wcscat(windir,DIR_LOC); if(CAntiSpySettings::GetSuiteType() == CAntiSpySettings::SUITE_TYPE::WINDOWS_VISTA) { return IsVistaPatched(windir); } else { const int conns = GetMaxConnections(windir); if(conns==10) return RET_NO; if(conns==-1) return RET_ERROR; return RET_YES; } }