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.

40 lines
1.0 KiB

  1. // DateTimeObject.h : Declaration of the CDateTimeObject
  2. #ifndef __DATETIMEOBJECT_H_
  3. #define __DATETIMEOBJECT_H_
  4. #include "resource.h" // main symbols
  5. #include <windows.h>
  6. #include <Chstring.h>
  7. /////////////////////////////////////////////////////////////////////////////
  8. // CDateTimeObject
  9. class ATL_NO_VTABLE CDateTimeObject :
  10. public CComObjectRootEx<CComSingleThreadModel>,
  11. public CComCoClass<CDateTimeObject, &CLSID_DateTimeObject>,
  12. public IDispatchImpl<IDateTimeObject, &IID_IDateTimeObject, &LIBID_SCRIPTINGUTILSLib>
  13. {
  14. public:
  15. CDateTimeObject()
  16. {
  17. }
  18. DECLARE_REGISTRY_RESOURCEID(IDR_DATETIMEOBJECT)
  19. DECLARE_PROTECT_FINAL_CONSTRUCT()
  20. BEGIN_COM_MAP(CDateTimeObject)
  21. COM_INTERFACE_ENTRY(IDateTimeObject)
  22. COM_INTERFACE_ENTRY(IDispatch)
  23. END_COM_MAP()
  24. // IDateTimeObject
  25. public:
  26. STDMETHOD(GetDateAndTime)(BSTR bstrInDateTime, VARIANT* pVarDateTime);
  27. private:
  28. LCID GetSupportedUserLocale( BOOL& bLocaleChanged ) ;
  29. SYSTEMTIME GetDateTime(CHString strTime) ;
  30. };
  31. #endif //__DATETIMEOBJECT_H_