IObjectSafety::SetInterfaceSafetyOptions (Windows CE 5.0)
This method makes an object safe for initialization or scripting.
HRESULT SetInterfaceSafetyOptions(REFIIDriid,DWORDdwOptionSetMask,DWORDdwEnabledOptions);
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.Value Description 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 Values
Returns one of the following values.
Value | Description |
---|---|
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
A control client, such as Internet Explorer, calls this method prior to loading a control to determine whether the control is safe for scripting or initialization.
If this method 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).
Requirements
OS Versions: Windows CE .NET 4.0 and later.
Header: Objsafe.h, Objsafe.idl.
Link Library: Developer implemented.
See Also
IObjectSafety | IDispatch | IPersist
Send Feedback on this topic to the authors