IObjectSafety::SetInterfaceSafetyOptions

Windows Mobile 6.5
A version of this page is also available for
4/8/2010

This method makes an object safe for initialization or scripting.


HRESULT SetInterfaceSafetyOptions(
  REFIID riid, 
  DWORD dwOptionSetMask, 
  DWORD dwEnabledOptions 
);

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 normal data during initialization.

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.

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).

Headerobjsafe.h, objsafe.idl
LibraryDeveloper Implemented
Windows Embedded CEWindows CE .NET 4.0 and later
Windows MobileWindows Mobile Version 5.0 and later

Community Additions

Show: