BitmapEffect.CreateBitmapEffectOuter BitmapEffect.CreateBitmapEffectOuter BitmapEffect.CreateBitmapEffectOuter BitmapEffect.CreateBitmapEffectOuter Method

定義

警告

この API は現在使われていません。

カスタム効果を初期化するために使用する IMILBitmapEffect オブジェクトへのハンドルを作成します。Creates a handle to an IMILBitmapEffect object that is used to initialize a custom effect.

protected:
 static System::Runtime::InteropServices::SafeHandle ^ CreateBitmapEffectOuter();
[System.Obsolete("BitmapEffects are deprecated and no longer function.  Consider using Effects where appropriate instead.")]
[System.Security.SecurityCritical]
[System.Security.SecurityTreatAsSafe]
protected static System.Runtime.InteropServices.SafeHandle CreateBitmapEffectOuter ();
static member CreateBitmapEffectOuter : unit -> System.Runtime.InteropServices.SafeHandle
Protected Shared Function CreateBitmapEffectOuter () As SafeHandle

戻り値

IMILBitmapEffect オブジェクトへのハンドル。A handle to an IMILBitmapEffect object.

次の例の実装を示しています。CreateUnmanagedEffectを使用して、CreateBitmapEffectOuter効果のラッパー オブジェクトを取得します。The following example shows an implementation of CreateUnmanagedEffect that uses the CreateBitmapEffectOuter method to retrieve a wrapper effect object.

[SecurityPermissionAttribute(SecurityAction.Demand, Flags = SecurityPermissionFlag.UnmanagedCode)]
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());
}
<SecurityPermissionAttribute(SecurityAction.Demand, Flags := SecurityPermissionFlag.UnmanagedCode)>
Protected Overrides Function CreateUnmanagedEffect() As SafeHandle
	Const CLSCTX_INPROC_SERVER As UInteger = 1
	Dim IID_IUnknown As New Guid("00000000-0000-0000-C000-000000000046")
	Dim guidEffectCLSID As New Guid("84CF07CC-34C4-460f-B435-3184F5F2FF2A")
	Dim wrapper As SafeHandle = BitmapEffect.CreateBitmapEffectOuter()

	Dim unmanagedEffect As COMSafeHandle
	Dim hresult As UInteger = Ole32Methods.CoCreateInstance(guidEffectCLSID, wrapper.DangerousGetHandle(), CLSCTX_INPROC_SERVER, IID_IUnknown, unmanagedEffect)
	InitializeBitmapEffect(wrapper, unmanagedEffect)
	If 0 = hresult Then
		Return wrapper
	End If
	Throw New Exception("Cannot instantiate effect. HRESULT = " & hresult.ToString())
End Function

注釈

カスタム効果とフレームワークの対話はを介して処理され、 IMILBitmapEffectオブジェクト。Framework interaction with custom effects is handled through an IMILBitmapEffect object. 外部の効果がを通じてカスタム効果で初期化されて、InitializeBitmapEffectメソッド。The outer effect is initialized with the custom effect through the InitializeBitmapEffect method.

適用対象