Leaked source code of windows server 2003
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.

50 lines
1.4 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. if (NULL != pnResult) // JonN 2002/03/28
  29. *pnResult = ::CompareMachineNames( QueryTargetServer(),
  30. refHasMachineName.QueryTargetServer() );
  31. return S_OK;
  32. }
  33. //
  34. // CCookie
  35. //
  36. CCookie::~CCookie()
  37. {
  38. ReleaseScopeChildren();
  39. // The views of this cookie should already have been closed
  40. // ReleaseResultChildren();
  41. ASSERT( 0 == m_nResultCookiesRefcount );
  42. }