Click to return to the Component Development home page    
IObjectSafety::GetInterfa...     IObjectWithSite Interface     Component Interface Refer...    
Web Workshop  |  Component Development

IObjectSafety::SetInterfaceSafetyOptions Method


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

IObjectSafety::GetInterfaceSafetyOptions



Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.