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.

49 lines
1.3 KiB

  1. // Stdcooki.cpp : Implementation of CCookie and related classes
  2. #include "stdcooki.h"
  3. #include "stdutils.h" // FCompareMachineNames
  4. //
  5. // CHasMachineName
  6. //
  7. // returns <0, 0 or >0
  8. HRESULT CHasMachineName::CompareMachineNames( CHasMachineName& refHasMachineName, int* pnResult )
  9. {
  10. /*
  11. // This code is intended to help debug a problem and can be removed later
  12. LPCWSTR pszTargetServer = QueryTargetServer();
  13. LPCWSTR pszTargetServer2 = refHasMachineName.QueryTargetServer();
  14. if (NULL != pszTargetServer && ::IsBadStringPtr(pszTargetServer,MAX_PATH))
  15. {
  16. ASSERT(FALSE);
  17. // repeat operation so that we can find problem
  18. pszTargetServer = QueryTargetServer();
  19. }
  20. if (NULL != pszTargetServer2 && ::IsBadStringPtr(pszTargetServer2,MAX_PATH))
  21. {
  22. ASSERT(FALSE);
  23. // repeat operation so that we can find problem
  24. pszTargetServer2 = refHasMachineName.QueryTargetServer();
  25. }
  26. // This code is intended to help debug a problem and can be removed later
  27. */
  28. *pnResult = ::CompareMachineNames( QueryTargetServer(),
  29. refHasMachineName.QueryTargetServer() );
  30. return S_OK;
  31. }
  32. //
  33. // CCookie
  34. //
  35. CCookie::~CCookie()
  36. {
  37. ReleaseScopeChildren();
  38. // The views of this cookie should already have been closed
  39. // ReleaseResultChildren();
  40. ASSERT( 0 == m_nResultCookiesRefcount );
  41. }