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.

58 lines
1.6 KiB

  1. /*---------------------------------------------------------------------------
  2. File: RebootComputer.h
  3. Comments: Implementation class definition for COM object to reboot a computer.
  4. (c) Copyright 1999, Mission Critical Software, Inc., All Rights Reserved
  5. Proprietary and confidential to Mission Critical Software, Inc.
  6. REVISION LOG ENTRY
  7. Revision By: Christy Boles
  8. Revised on 02/15/99 11:24:22
  9. ---------------------------------------------------------------------------
  10. */
  11. // RebootComputer.h : Declaration of the CRebootComputer
  12. #ifndef __REBOOTCOMPUTER_H_
  13. #define __REBOOTCOMPUTER_H_
  14. #include "resource.h" // main symbols
  15. /////////////////////////////////////////////////////////////////////////////
  16. // CRebootComputer
  17. class ATL_NO_VTABLE CRebootComputer :
  18. public CComObjectRootEx<CComSingleThreadModel>,
  19. public CComCoClass<CRebootComputer, &CLSID_RebootComputer>,
  20. public IDispatchImpl<IRebootComputer, &IID_IRebootComputer, &LIBID_MCSDCTWORKEROBJECTSLib>
  21. {
  22. BOOL m_bNoChange;
  23. public:
  24. CRebootComputer()
  25. {
  26. m_bNoChange = FALSE;
  27. }
  28. DECLARE_REGISTRY_RESOURCEID(IDR_REBOOT)
  29. DECLARE_PROTECT_FINAL_CONSTRUCT()
  30. BEGIN_COM_MAP(CRebootComputer)
  31. COM_INTERFACE_ENTRY(IRebootComputer)
  32. COM_INTERFACE_ENTRY(IDispatch)
  33. END_COM_MAP()
  34. // IWorkNode
  35. public:
  36. STDMETHOD(Process)(IUnknown *pWorkItem);
  37. // IRebootComputer
  38. public:
  39. STDMETHOD(get_NoChange)(/*[out, retval]*/ BOOL *pVal);
  40. STDMETHOD(put_NoChange)(/*[in]*/ BOOL newVal);
  41. STDMETHOD(Reboot)(BSTR Computer, DWORD delay);
  42. };
  43. #endif //__REBOOTCOMPUTER_H_