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.

39 lines
1.0 KiB

  1. // objects used to access the NAT resources
  2. #include "stdafx.h"
  3. #include "natobjs.h"
  4. #include "resource.h"
  5. //---------------------------------------------------------------------------------
  6. CNATSite::CNATSite(CNATGroup* pGroup, CNATSiteComputer* pSiteComputer,
  7. LPCTSTR pszPrivateIP, LPCTSTR pszName ):
  8. m_pSiteComputer(pSiteComputer),
  9. m_pGroup(pGroup)
  10. {
  11. m_csPrivateIP = pszPrivateIP;
  12. m_csName = pszName;
  13. ASSERT( pGroup );
  14. ASSERT( m_pSiteComputer );
  15. if ( m_pSiteComputer )
  16. m_pSiteComputer->AddRef();
  17. }
  18. //---------------------------------------------------------------------------------
  19. CNATSite::~CNATSite() // don't forget to decrement the refcount
  20. {
  21. ASSERT( m_pSiteComputer );
  22. if ( m_pSiteComputer )
  23. m_pSiteComputer->RemoveRef();
  24. }
  25. //---------------------------------------------------------------------------------
  26. // Edit the properties of this Site - true if OK
  27. BOOL CNATSite::OnProperties()
  28. {
  29. return TRUE;
  30. }