the IObjectSafetyImpl

 

IObjectSafetyImpl   Allows an object to be marked as safe for initialization or safe for scripting.

                                 使一個對象在初始化被標記爲安全,或標記爲腳本安全。

什麼意思????罵人

This class provides a default implementation of the IObjectSafety interface to allow a client to retrieve and set an object's safety levels.

提供指定安全等級的實現接口

 

template <class T, DWORD dwSupportedSafety>
class IObjectSafetyImpl

 

Parameters

T

Your class, derived from IObjectSafetyImpl.

dwSupportedSafety

Specifies the supported safety options for the control. Can be one of the following values:

  • INTERFACESAFE_FOR_UNTRUSTED_CALLER   The interface identified by the SetInterfaceSafetyOptions parameter riid should be made safe for scripting.

  • INTERFACESAFE_FOR_UNTRUSTED_DATA   The interface identified by the SetInterfaceSafetyOptions parameter riid should be made safe for untrusted data during initialization.

Remarks

Class IObjectSafetyImpl provides a default implementation of IObjectSafety. The IObjectSafety interface allows a client to retrieve and set an object's safety levels. For example, a web browser can call IObjectSafety::SetInterfaceSafetyOptions to make a control safe for initialization or safe for scripting.

比如:web瀏覽器可以調用IObjectSafety::SetInterfaceSafetyOptions標記爲安全

Note that using the IMPLEMENTED_CATEGORY macro with the CATID_SafeForScripting and CATID_SafeForInitializing component categories provides an alternative way of specifying that a component is safe.

Related Articles   ATL Tutorial, Creating an ATL Project

 

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章