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.

84 lines
2.3 KiB

  1. //******************************************************************************
  2. //
  3. // Microsoft Confidential. Copyright (c) Microsoft Corporation 1999. All rights reserved
  4. //
  5. // File: WbemTime.h
  6. //
  7. // Description: Utility functions to convert between SYSTEMTIME and strings in
  8. // WBEM datetime format.
  9. //
  10. // History: 12-08-99 leonardm Created
  11. //
  12. //******************************************************************************
  13. #ifndef WBEMTIME_H__D91F1DC7_B995_403d_9166_9D43DB050017__INCLUDED_
  14. #define WBEMTIME_H__D91F1DC7_B995_403d_9166_9D43DB050017__INCLUDED_
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. #define WBEM_TIME_STRING_LENGTH 25
  19. //******************************************************************************
  20. //
  21. // Function: SystemTimeToWbemTime
  22. //
  23. // Description:
  24. //
  25. // Parameters:
  26. //
  27. // Return:
  28. //
  29. // History: 12/08/99 leonardm Created.
  30. //
  31. //******************************************************************************
  32. HRESULT SystemTimeToWbemTime(SYSTEMTIME& sysTime, XBStr& xbstrWbemTime);
  33. //******************************************************************************
  34. //
  35. // Function: WbemTimeToSystemTime
  36. //
  37. // Description:
  38. //
  39. // Parameters:
  40. //
  41. // Return:
  42. //
  43. // History: 12/08/99 leonardm Created.
  44. //
  45. //******************************************************************************
  46. HRESULT WbemTimeToSystemTime(XBStr& xbstrWbemTime, SYSTEMTIME& sysTime);
  47. //*************************************************************
  48. //
  49. // Function: GetCurrentWbemTime
  50. //
  51. // Purpose: Gets the current date and time in WBEM format.
  52. //
  53. // Parameters: xbstrCurrentTime - Reference to XBStr which, on
  54. // success, receives the formated
  55. // string containing the current
  56. // date and time.
  57. //
  58. // Returns: On success it returns S_OK.
  59. // On failure, it returns E_OUTOFMEMORY.
  60. //
  61. // History: 12/07/99 - LeonardM - Created.
  62. //
  63. //*************************************************************
  64. HRESULT GetCurrentWbemTime(XBStr& xbstrCurrentTime);
  65. #ifdef __cplusplus
  66. } // extern "C" {
  67. #endif
  68. #endif // #ifndef WBEMTIME_H__D91F1DC7_B995_403d_9166_9D43DB050017__INCLUDED_