1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2025-09-20 12:36:05 +08:00
Files
hl2sdk/utils/vmpi/vmpi_registry_query_thread.h

39 lines
870 B
C
Raw Normal View History

2025-02-19 18:39:00 -05:00
//========= Copyright <20> 1996-2005, Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
//=============================================================================//
#pragma once
#include "iphelpers.h"
#include "serviceinfo.h"
#include "tier1/utlvector.h"
class CVMPIRegistryQueryThread
{
public:
CVMPIRegistryQueryThread();
~CVMPIRegistryQueryThread();
// This creates the thread that periodically checks "net view" to get the current list of
// machines out on the network.
void Init();
void Term();
void GetRegisteredServices( CUtlVector<CServiceInfo> &services );
private:
void UpdateServicesFromRegistry();
DWORD ThreadFn();
static DWORD WINAPI StaticThreadFn( LPVOID lpParameter );
CUtlVector<CServiceInfo> m_RegisteredServices;
HANDLE m_hThread;
HANDLE m_hThreadExitEvent;
CRITICAL_SECTION m_ComputerNamesCS;
};