IObjectSafety::SetInterfaceSafetyOptionsIObjectSafety::SetInterfaceSafetyOptions*
*Contents  *Index  *Topic Contents
*Previous Topic: IObjectSafety::GetInterfaceSafetyOptions
*Next Topic: Licensing ActiveX Controls

IObjectSafety::SetInterfaceSafetyOptions

HRESULT SetInterfaceSafetyOptions( 
    /* [in] */ REFIID riid,
    /* [in] */ DWORD dwOptionSetMask,
    /* [in] */ DWORD dwEnabledOptions);

Makes an object safe for initialization or scripting.

riid
Specifies the interface ID for the object to be made safe.
dwOptionSetMask
Specifies the options to be changed.
dwEnabledOptions
Specifies the settings for the options that are to be changed. This can be one of the following values:
INTERFACESAFE_FOR_UNTRUSTED_CALLER The interface identified by riid should be made safe for scripting.
INTERFACESAFE_FOR_UNTRUSTED_DATA The interface identified by riid should be made safe for untrusted data during initialization.

Typically, a control client would call this method before attempting to script or initialize the object, in an attempt to require that the object is safe for the desired action. If SetInterfaceSafetyOptions returns failure, its client displays the user interface to the user to confirm whether the action should be allowed.

This method takes an interface (either IDispatch for scripting or IPersist* for initialization), a bitmask of options to change (dwOptionSetMask), and the new settings for those options (dwEnabledOptions). The currently supported capabilities are, as described above, INTERFACESAFE_FOR_UNTRUSTED_CALLER and INTERFACESAFE_FOR_UNTRUSTED_DATA.


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.