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.

51 lines
1.4 KiB

  1. //-----------------------------------------------------------------------------
  2. //
  3. //
  4. // File: qwiktime.h
  5. //
  6. // Description: Header for CAQQuickTime class... a class to handle filling
  7. // and comparing FILETIME by using the GetTickCount instead of using
  8. // GetSystemTime
  9. //
  10. // Author: Mike Swafford (MikeSwa)
  11. //
  12. // History:
  13. // 7/9/98 - MikeSwa Created
  14. //
  15. // Copyright (C) 1998 Microsoft Corporation
  16. //
  17. //-----------------------------------------------------------------------------
  18. #ifndef __QWIKTIME_H__
  19. #define __QWIKTIME_H__
  20. #define QUICK_TIME_SIG 'miTQ'
  21. class CAQQuickTime
  22. {
  23. protected:
  24. DWORD m_dwSignature;
  25. DWORD m_dwLastInternalTime;
  26. FILETIME m_ftSystemStart;
  27. DWORD dwGetInternalTime();
  28. public:
  29. CAQQuickTime();
  30. // Get expire time using context or by getting the current time
  31. void GetExpireTime(
  32. IN DWORD cMinutesExpireTime,
  33. IN OUT FILETIME *pftExpireTime,
  34. IN OUT DWORD *pdwExpireContext); //if non-zero, will use last time
  35. // Overloaded version takes start time instead of using context
  36. void GetExpireTime(
  37. IN FILETIME ftStartTime,
  38. IN DWORD cMinutesExpireTime,
  39. IN OUT FILETIME *pftExpireTime);
  40. BOOL fInPast(IN FILETIME *pftExpireTime, IN OUT DWORD *pdwExpireContext);
  41. };
  42. #endif //__QWIKTIME_H__