Klasa IObjectSafetyImplIObjectSafetyImpl Class
Ta klasa udostępnia domyślną implementację interfejsu, IObjectSafety
Aby umożliwić klientowi pobieranie i ustawianie poziomów bezpieczeństwa obiektu.This class provides a default implementation of the IObjectSafety
interface to allow a client to retrieve and set an object's safety levels.
Ważne
Tej klasy i jej elementów członkowskich nie można używać w aplikacjach, które są wykonywane w środowisko wykonawcze systemu Windows.This class and its members cannot be used in applications that execute in the Windows Runtime.
SkładniaSyntax
template <class T,DWORD dwSupportedSafety>
class IObjectSafetyImpl
ParametryParameters
TT
Klasa, która pochodzi od IObjectSafetyImpl
.Your class, derived from IObjectSafetyImpl
.
dwSupportedSafetydwSupportedSafety
Określa obsługiwane opcje zabezpieczeń dla kontrolki.Specifies the supported safety options for the control. Może być jedną z następujących wartości:Can be one of the following values:
INTERFACESAFE_FOR_UNTRUSTED_CALLER interfejs identyfikowany przez parametr SetInterfaceSafetyOptions
riid
powinien być bezpieczny dla skryptów.INTERFACESAFE_FOR_UNTRUSTED_CALLER The interface identified by the SetInterfaceSafetyOptions parameterriid
should be made safe for scripting.INTERFACESAFE_FOR_UNTRUSTED_DATA interfejs identyfikowany przez
SetInterfaceSafetyOptions
parametrriid
powinien być bezpieczny dla niezaufanych danych podczas inicjowania.INTERFACESAFE_FOR_UNTRUSTED_DATA The interface identified by theSetInterfaceSafetyOptions
parameterriid
should be made safe for untrusted data during initialization.
Elementy członkowskieMembers
Metody publicznePublic Methods
NazwaName | OpisDescription |
---|---|
IObjectSafetyImpl:: GetInterfaceSafetyOptionsIObjectSafetyImpl::GetInterfaceSafetyOptions | Pobiera opcje bezpieczeństwa obsługiwane przez obiekt, a także opcje bezpieczeństwa aktualnie ustawione dla obiektu.Retrieves the safety options supported by the object, as well as the safety options currently set for the object. |
IObjectSafetyImpl:: SetInterfaceSafetyOptionsIObjectSafetyImpl::SetInterfaceSafetyOptions | Sprawia, że obiekt jest bezpieczny dla inicjalizacji lub tworzenia skryptów.Makes the object safe for initialization or scripting. |
Publiczne elementy członkowskie danychPublic Data Members
NazwaName | OpisDescription |
---|---|
IObjectSafetyImpl:: m_dwCurrentSafetyIObjectSafetyImpl::m_dwCurrentSafety | Przechowuje bieżący poziom bezpieczeństwa obiektu.Stores the object's current safety level. |
UwagiRemarks
Klasa IObjectSafetyImpl
zawiera domyślną implementację programu IObjectSafety
.Class IObjectSafetyImpl
provides a default implementation of IObjectSafety
. IObjectSafety
Interfejs pozwala klientowi na pobieranie i ustawianie poziomów bezpieczeństwa obiektu.The IObjectSafety
interface allows a client to retrieve and set an object's safety levels. Na przykład przeglądarka sieci Web może wywoływać, IObjectSafety::SetInterfaceSafetyOptions
Aby zapewnić bezpieczną kontrolę w zakresie inicjalizacji lub bezpiecznego wykonywania skryptów.For example, a web browser can call IObjectSafety::SetInterfaceSafetyOptions
to make a control safe for initialization or safe for scripting.
Należy zauważyć, że użycie makra IMPLEMENTED_CATEGORY z kategoriami składników CATID_SafeForScripting i CATID_SafeForInitializing zapewnia alternatywny sposób określania, czy składnik jest bezpieczny.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.
Samouczki dotyczące bibliotekiATL, Tworzenie projektu ATLRelated Articles ATL Tutorial, Creating an ATL Project
Hierarchia dziedziczeniaInheritance Hierarchy
IObjectSafety
IObjectSafetyImpl
WymaganiaRequirements
Nagłówek: atlctl. hHeader: atlctl.h
IObjectSafetyImpl:: GetInterfaceSafetyOptionsIObjectSafetyImpl::GetInterfaceSafetyOptions
Pobiera opcje bezpieczeństwa obsługiwane przez obiekt, a także opcje bezpieczeństwa aktualnie ustawione dla obiektu.Retrieves the safety options supported by the object, as well as the safety options currently set for the object.
HRESULT GetInterfaceSafetyOptions(
REFIID riid,
DWORD* pdwSupportedOptions,
DWORD* pdwEnabledOptions);
UwagiRemarks
Implementacja zwraca odpowiednie wartości dla dowolnego interfejsu obsługiwanego przez implementację obiektu IUnknown::QueryInterface
.The implementation returns the appropriate values for any interface supported by the object's implementation of IUnknown::QueryInterface
.
Ważne
Każdy obiekt, który obsługuje IObjectSafety
, jest odpowiedzialny za jego własne zabezpieczenia i wszystkie obiekty, które są przez niego delegowane.Any object that supports IObjectSafety
is responsible for its own security, and that of any object it delegates. Programista musi wziąć pod uwagę problemy związane z uruchamianiem kodu w kontekście użytkownika, skrypty między lokacjami i wykonać odpowiednie sprawdzanie strefy.The programmer must take into account issues arising from running code in the user's context, cross-site scripting and perform suitable zone checking.
Zobacz IObjectSafety:: GetInterfaceSafetyOptions w Windows SDK.See IObjectSafety::GetInterfaceSafetyOptions in the Windows SDK.
IObjectSafetyImpl:: m_dwCurrentSafetyIObjectSafetyImpl::m_dwCurrentSafety
Przechowuje bieżący poziom bezpieczeństwa obiektu.Stores the object's current safety level.
DWORD m_dwCurrentSafety;
IObjectSafetyImpl:: SetInterfaceSafetyOptionsIObjectSafetyImpl::SetInterfaceSafetyOptions
Sprawia, że obiekt jest bezpieczny dla inicjalizacji lub tworzenia skryptów, ustawiając element członkowski m_dwCurrentSafety na odpowiednią wartość.Makes the object safe for initialization or scripting by setting the m_dwCurrentSafety member to the appropriate value.
HRESULT SetInterfaceSafetyOptions(
REFIID riid,
DWORD dwOptionsSetMask,
DWORD dwEnabledOptions);
UwagiRemarks
Implementacja zwraca E_NOINTERFACE dla dowolnego interfejsu, który nie jest obsługiwany przez implementację obiektu IUnknown::QueryInterface
.The implementation returns E_NOINTERFACE for any interface not supported by the object's implementation of IUnknown::QueryInterface
.
Ważne
Każdy obiekt, który obsługuje IObjectSafety
, jest odpowiedzialny za jego własne zabezpieczenia i wszystkie obiekty, które są przez niego delegowane.Any object that supports IObjectSafety
is responsible for its own security, and that of any object it delegates. Programista musi wziąć pod uwagę problemy związane z uruchamianiem kodu w kontekście użytkownika, skrypty między lokacjami i wykonać odpowiednie sprawdzanie strefy.The programmer must take into account issues arising from running code in the user's context, cross-site scripting and perform suitable zone checking.
Zobacz IObjectSafety:: SetInterfaceSafetyOptions w Windows SDK.See IObjectSafety::SetInterfaceSafetyOptions in the Windows SDK.
Zobacz teżSee also
IObjectSafety, interfejsIObjectSafety Interface
Przegląd klasClass Overview