Makes an object safe for initialization or scripting.
Syntax
HRESULT SetInterfaceSafetyOptions( REFIID riid, DWORD dwOptionSetMask, DWORD dwEnabledOptions );
Parameters
- riid
- [in] Interface identifier for the object to be made safe.
- dwOptionSetMask
- [in] Options to be changed.
- dwEnabledOptions
- [in] Settings for the options that are to be changed. This can be one of the following values:
- INTERFACESAFE_FOR_UNTRUSTED_CALLER
- Indicates the interface identified by riid should be made safe for scripting.
- INTERFACESAFE_FOR_UNTRUSTED_DATA
- Indicates the interface identified by riid should be made safe for untrusted data during initialization.
Return Value
Returns one of the following values:
S_OK The object is safe for loading. E_NOINTERFACE The riid parameter specifies an interface that is unknown to the object. E_FAIL The dwOptionSetMask parameter specifies an option that is not supported by the object.
Remarks
Typically, a control client calls this method prior to loading a control to determine whether the control is safe for scripting or initialization. If SetInterfaceSafetyOptions returns E_FAIL, its client displays the user interface for the user to confirm whether the action should be allowed.
This method takes an interface (either IDispatch for scripting or IPersist* for initialization.)
See Also