Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1000 B

  1. //+-------------------------------------------------------------------
  2. //
  3. // File: addrrefresh.hxx
  4. //
  5. // Contents: Defines classes for handling dynamic TCP/IP address
  6. // changes
  7. //
  8. // Classes: CAddrRefreshMgr
  9. //
  10. // History: 26-Oct-00 jsimmons Created
  11. //
  12. //--------------------------------------------------------------------
  13. #pragma once
  14. class CAddrRefreshMgr
  15. {
  16. public:
  17. CAddrRefreshMgr();
  18. void ListenedOnTCP() { _bListenedOnTCP = TRUE; };
  19. void RegisterForAddressChanges();
  20. private:
  21. // private functions
  22. static void CALLBACK TimerCallbackFn(void*,BOOLEAN);
  23. void TimerCallbackFnHelper();
  24. // private data
  25. HANDLE _hEventIPAddressChange;
  26. HANDLE _hWaitObject;
  27. SOCKET _IPChangeNotificationSocket;
  28. BOOL _bWaitRegistered;
  29. BOOL _bRegisteredForNotifications;
  30. BOOL _bListenedOnTCP;
  31. WSAOVERLAPPED _WSAOverlapped;
  32. };
  33. // References the single instance of this object
  34. extern CAddrRefreshMgr gAddrRefreshMgr;