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.

53 lines
1.5 KiB

  1. /*---------------------------------------------------------------------------
  2. File: RenameComputer.h
  3. Comments: Implementation class definition for COM object to rename the local 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:25:06
  9. ---------------------------------------------------------------------------
  10. */
  11. // RenameComputer.h : Declaration of the CRenameComputer
  12. #ifndef __RENAMECOMPUTER_H_
  13. #define __RENAMECOMPUTER_H_
  14. #include "resource.h" // main symbols
  15. /////////////////////////////////////////////////////////////////////////////
  16. // CRenameComputer
  17. class ATL_NO_VTABLE CRenameComputer :
  18. public CComObjectRootEx<CComSingleThreadModel>,
  19. public CComCoClass<CRenameComputer, &CLSID_RenameComputer>,
  20. public IDispatchImpl<IRenameComputer, &IID_IRenameComputer, &LIBID_MCSDCTWORKEROBJECTSLib>
  21. {
  22. BOOL m_bNoChange;
  23. public:
  24. CRenameComputer()
  25. {
  26. m_bNoChange = FALSE;
  27. }
  28. DECLARE_REGISTRY_RESOURCEID(IDR_RENAMECOMPUTER)
  29. DECLARE_PROTECT_FINAL_CONSTRUCT()
  30. BEGIN_COM_MAP(CRenameComputer)
  31. COM_INTERFACE_ENTRY(IRenameComputer)
  32. COM_INTERFACE_ENTRY(IDispatch)
  33. END_COM_MAP()
  34. // IRenameComputer
  35. public:
  36. STDMETHOD(get_NoChange)(/*[out, retval]*/ BOOL *pVal);
  37. STDMETHOD(put_NoChange)(/*[in]*/ BOOL newVal);
  38. STDMETHOD(RenameLocalComputer)(BSTR NewName);
  39. };
  40. #endif //__RENAMECOMPUTER_H_