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.

29 lines
1.0 KiB

  1. #ifndef _COBJSAFE_H_
  2. #define _COBJSAFE_H_
  3. // Static functions of interest to others
  4. HRESULT DefaultGetSafetyOptions(REFIID riid, DWORD *pdwSupportedOptions, DWORD *pdwEnabledOptions);
  5. HRESULT DefaultSetSafetyOptions(REFIID riid, DWORD dwOptionSetMask, DWORD dwEnabledOptions);
  6. HRESULT MakeSafeForScripting(IUnknown **punk); // returns TRUE if punk is safe for scripting
  7. class CObjectSafety : public IObjectSafety
  8. {
  9. public:
  10. CObjectSafety() : _dwSafetyOptions(0) { }
  11. // IUnknown (we multiply inherit from IUnknown, disambiguate here)
  12. STDMETHOD(QueryInterface)(REFIID riid, LPVOID * ppvObj) PURE;
  13. STDMETHOD_(ULONG, AddRef)() PURE;
  14. STDMETHOD_(ULONG, Release)() PURE;
  15. // IObjectSafety
  16. STDMETHOD(GetInterfaceSafetyOptions)(REFIID riid, DWORD *pdwSupportedOptions, DWORD *pdwEnabledOptions);
  17. STDMETHOD(SetInterfaceSafetyOptions)(REFIID riid, DWORD dwOptionSetMask, DWORD dwEnabledOptions);
  18. protected:
  19. DWORD _dwSafetyOptions; // IObjectSafety IID_IDispatch options
  20. };
  21. #endif // _COBJSAFE_H_