BitmapEffect.CreateBitmapEffectOuter Método

Definição

Cuidado

BitmapEffects are deprecated and no longer function. Consider using Effects where appropriate instead.

Cria um identificador para um objeto IMILBitmapEffect usado para inicializar um efeito personalizado.

C#
[System.Security.SecurityCritical]
[System.Security.SecurityTreatAsSafe]
protected static System.Runtime.InteropServices.SafeHandle CreateBitmapEffectOuter();
C#
[System.Security.SecurityCritical]
[System.Security.SecurityTreatAsSafe]
[System.Obsolete("BitmapEffects are deprecated and no longer function.  Consider using Effects where appropriate instead.")]
protected static System.Runtime.InteropServices.SafeHandle CreateBitmapEffectOuter();
C#
[System.Obsolete("BitmapEffects are deprecated and no longer function.  Consider using Effects where appropriate instead.")]
protected static System.Runtime.InteropServices.SafeHandle CreateBitmapEffectOuter();

Retornos

Um identificador para um objeto IMILBitmapEffect.

Atributos

Exemplos

O exemplo a seguir mostra uma implementação de CreateUnmanagedEffect que usa o CreateBitmapEffectOuter método para recuperar um objeto de efeito wrapper.

C#
unsafe protected override SafeHandle CreateUnmanagedEffect()
{
    const uint CLSCTX_INPROC_SERVER = 1;
    Guid IID_IUnknown = new Guid("00000000-0000-0000-C000-000000000046");
    Guid guidEffectCLSID = new Guid("84CF07CC-34C4-460f-B435-3184F5F2FF2A");
    SafeHandle wrapper = BitmapEffect.CreateBitmapEffectOuter();

    COMSafeHandle unmanagedEffect;
    uint hresult = Ole32Methods.CoCreateInstance(
                        ref guidEffectCLSID,
                        wrapper.DangerousGetHandle(),
                        CLSCTX_INPROC_SERVER,
                        ref IID_IUnknown,
                        out unmanagedEffect);
    InitializeBitmapEffect(wrapper, unmanagedEffect);
    if (0 == hresult) return wrapper;
    throw new Exception("Cannot instantiate effect. HRESULT = " + hresult.ToString());
}

Comentários

A interação da estrutura com efeitos personalizados é tratada por meio de um objeto IMILBitmapEffect . O efeito externo é inicializado com o efeito personalizado por meio do InitializeBitmapEffect método .

Aplica-se a

Produto Versões (Obsoleto)
.NET Framework 3.0, 3.5 (4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1)
Windows Desktop (3.0, 3.1, 5, 6, 7, 8, 9)