Partager via


IObjectSafety::SetInterfaceSafetyOptions (Windows Embedded CE 6.0)

1/6/2010

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

    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.

Return Value

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

Header objsafe.h, objsafe.idl
Library Developer Implemented
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

IObjectSafety
IDispatch
IPersist