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.

76 lines
2.6 KiB

  1. // SetupClass.h : Declaration of the CSetupClass
  2. #ifndef __SETUPCLASS_H_
  3. #define __SETUPCLASS_H_
  4. #include "resource.h" // main symbols
  5. class CDeviceConsole;
  6. /////////////////////////////////////////////////////////////////////////////
  7. // CSetupClass
  8. class ATL_NO_VTABLE CSetupClass :
  9. public CComObjectRootEx<CComSingleThreadModel>,
  10. public IDispatchImpl<ISetupClass, &IID_ISetupClass, &LIBID_DEVCON2Lib>,
  11. public ISetupClassInternal
  12. {
  13. protected:
  14. CComPtr<IDeviceConsole> DeviceConsole;
  15. BSTR pMachine;
  16. GUID ClassGuid;
  17. public:
  18. CSetupClass()
  19. {
  20. pMachine = NULL;
  21. ZeroMemory(&ClassGuid,sizeof(ClassGuid));
  22. }
  23. ~CSetupClass();
  24. DECLARE_PROTECT_FINAL_CONSTRUCT()
  25. BEGIN_COM_MAP(CSetupClass)
  26. COM_INTERFACE_ENTRY(ISetupClass)
  27. COM_INTERFACE_ENTRY(ISetupClassInternal)
  28. COM_INTERFACE_ENTRY(IDispatch)
  29. END_COM_MAP()
  30. // ISetupClass
  31. public:
  32. STDMETHOD(RegDelete)(/*[in]*/ BSTR key);
  33. STDMETHOD(RegWrite)(/*[in]*/ BSTR key,/*[in]*/ VARIANT val,/*[in,optional]*/ VARIANT strType);
  34. STDMETHOD(RegRead)(/*[in]*/ BSTR key,VARIANT * pValue);
  35. STDMETHOD(get_CharacteristicsOverride)(/*[out, retval]*/ VARIANT *pVal);
  36. STDMETHOD(put_CharacteristicsOverride)(/*[in]*/ VARIANT newVal);
  37. STDMETHOD(get_ForceExclusive)(/*[out, retval]*/ VARIANT *pVal);
  38. STDMETHOD(put_ForceExclusive)(/*[in]*/ VARIANT newVal);
  39. STDMETHOD(get_DeviceTypeOverride)(/*[out, retval]*/ VARIANT *pVal);
  40. STDMETHOD(put_DeviceTypeOverride)(/*[in]*/ VARIANT newVal);
  41. STDMETHOD(get_Security)(/*[out, retval]*/ VARIANT *pVal);
  42. STDMETHOD(put_Security)(/*[in]*/ VARIANT newVal);
  43. STDMETHOD(get_Machine)(/*[out, retval]*/ BSTR *pVal);
  44. STDMETHOD(get_Guid)(/*[out, retval]*/ BSTR *pVal);
  45. STDMETHOD(CreateEmptyDeviceList)(/*[retval,out]*/ LPDISPATCH *pDevices);
  46. STDMETHOD(Devices)(/*[in,optional]*/ VARIANT flags,/*[out]*/ LPDISPATCH * pDevices);
  47. STDMETHOD(get_Description)(/*[out, retval]*/ BSTR *pVal);
  48. STDMETHOD(get_Name)(/*[out, retval]*/ BSTR *pVal);
  49. // internal
  50. public:
  51. STDMETHOD(get__Machine)(/*[out, retval]*/ BSTR *pVal);
  52. STDMETHOD(get__ClassGuid)(/*[out, retval]*/ GUID *pVal);
  53. //
  54. // helpers
  55. //
  56. GUID* Guid();
  57. BOOL IsDuplicate(GUID *pCheck);
  58. HRESULT SubKeyInfo(LPCWSTR subkey, HKEY *hKey, LPWSTR *pSubKey,LPCWSTR *keyval,BOOL writeable);
  59. HRESULT Init(GUID *pGuid,LPWSTR Machine, IDeviceConsole *pDevCon);
  60. HRESULT GetClassProperty(DWORD prop, VARIANT *pVal);
  61. HRESULT PutClassPropertyString(DWORD prop, VARIANT *pVal);
  62. HRESULT PutClassPropertyDword(DWORD prop, VARIANT *pVal);
  63. HRESULT PutClassPropertyMultiSz(DWORD prop, VARIANT *pVal);
  64. };
  65. #endif //__SETUPCLASS_H_