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.

52 lines
1.5 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright(C) 2000 Microsoft Corporation all rights reserved.
  4. //
  5. // Module: Version.cpp
  6. //
  7. // Project: Windows 2000 IAS
  8. //
  9. // Description: Implementation of the CProperties class
  10. // works only with m_StdSession (database being upgraded)
  11. //
  12. // Author: tperraut
  13. //
  14. // Revision 02/24/2000 created
  15. //
  16. //////////////////////////////////////////////////////////////////////////////
  17. #include "stdafx.h"
  18. #include "version.h"
  19. //////////////////////////////////////////////////////////////////////////////
  20. // CVersionGet::GetVersion
  21. //////////////////////////////////////////////////////////////////////////////
  22. LONG CVersionGet::GetVersion()
  23. {
  24. HRESULT hr = BaseExecute();
  25. if ( FAILED(hr) )
  26. {
  27. /////////////////////////////////////
  28. // The Version table does not exist.
  29. // return zero as the version #
  30. /////////////////////////////////////
  31. ///////////////////////////
  32. // Set Zero as the version
  33. ///////////////////////////
  34. m_Version = 0;
  35. }
  36. Close();
  37. return m_Version;
  38. }
  39. //////////////////////////////////////////////////////////////////////////////
  40. // CVersion::GetVersion
  41. //////////////////////////////////////////////////////////////////////////////
  42. LONG CVersion::GetVersion()
  43. {
  44. CVersionGet GetVer(m_Session);
  45. return GetVer.GetVersion();
  46. }