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.

40 lines
790 B

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1992.
  5. //
  6. // File: Time32.CXX, 32-bit only
  7. //
  8. // Contents: time routine
  9. //
  10. // Functions: DfGetTOD
  11. //
  12. // History: 13-Nov-92 AlexT Created
  13. //
  14. //--------------------------------------------------------------------------
  15. #include <exphead.cxx>
  16. #pragma hdrstop
  17. SCODE DfGetTOD(TIME_T *pft)
  18. {
  19. SCODE sc;
  20. SYSTEMTIME SystemTime;
  21. GetSystemTime(&SystemTime);
  22. olAssert(sizeof(TIME_T) == sizeof(FILETIME));
  23. BOOL b = SystemTimeToFileTime(&SystemTime, pft);
  24. if (b)
  25. {
  26. sc = S_OK;
  27. }
  28. else
  29. {
  30. olAssert(!aMsg("Unable to convert time"));
  31. sc = E_FAIL;
  32. }
  33. return(sc);
  34. }