windows-nt/Source/XPSP1/NT/com/ole32/dcomss/olescm/addrrefresh.hxx

42 lines
1,000 B
C++
Raw Normal View History

2020-09-26 03:20:57 -05:00
//+-------------------------------------------------------------------
//
// File: addrrefresh.hxx
//
// Contents: Defines classes for handling dynamic TCP/IP address
// changes
//
// Classes: CAddrRefreshMgr
//
// History: 26-Oct-00 jsimmons Created
//
//--------------------------------------------------------------------
#pragma once
class CAddrRefreshMgr
{
public:
CAddrRefreshMgr();
void ListenedOnTCP() { _bListenedOnTCP = TRUE; };
void RegisterForAddressChanges();
private:
// private functions
static void CALLBACK TimerCallbackFn(void*,BOOLEAN);
void TimerCallbackFnHelper();
// private data
HANDLE _hEventIPAddressChange;
HANDLE _hWaitObject;
SOCKET _IPChangeNotificationSocket;
BOOL _bWaitRegistered;
BOOL _bRegisteredForNotifications;
BOOL _bListenedOnTCP;
WSAOVERLAPPED _WSAOverlapped;
};
// References the single instance of this object
extern CAddrRefreshMgr gAddrRefreshMgr;