BitmapEffect.InitializeBitmapEffect(SafeHandle, SafeHandle) 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
주의
BitmapEffects are deprecated and no longer function. Consider using Effects where appropriate instead.
지정된 IMILBitmapEffectPrimitive를 사용하여 CreateBitmapEffectOuter()에서 가져온 IMILBitmapEffect 핸들을 초기화합니다.
protected:
static void InitializeBitmapEffect(System::Runtime::InteropServices::SafeHandle ^ outerObject, System::Runtime::InteropServices::SafeHandle ^ innerObject);
[System.Security.SecurityCritical]
[System.Security.SecurityTreatAsSafe]
protected static void InitializeBitmapEffect (System.Runtime.InteropServices.SafeHandle outerObject, System.Runtime.InteropServices.SafeHandle innerObject);
[System.Security.SecurityCritical]
[System.Security.SecurityTreatAsSafe]
[System.Obsolete("BitmapEffects are deprecated and no longer function. Consider using Effects where appropriate instead.")]
protected static void InitializeBitmapEffect (System.Runtime.InteropServices.SafeHandle outerObject, System.Runtime.InteropServices.SafeHandle innerObject);
[System.Obsolete("BitmapEffects are deprecated and no longer function. Consider using Effects where appropriate instead.")]
protected static void InitializeBitmapEffect (System.Runtime.InteropServices.SafeHandle outerObject, System.Runtime.InteropServices.SafeHandle innerObject);
[<System.Security.SecurityCritical>]
[<System.Security.SecurityTreatAsSafe>]
static member InitializeBitmapEffect : System.Runtime.InteropServices.SafeHandle * System.Runtime.InteropServices.SafeHandle -> unit
[<System.Security.SecurityCritical>]
[<System.Security.SecurityTreatAsSafe>]
[<System.Obsolete("BitmapEffects are deprecated and no longer function. Consider using Effects where appropriate instead.")>]
static member InitializeBitmapEffect : System.Runtime.InteropServices.SafeHandle * System.Runtime.InteropServices.SafeHandle -> unit
[<System.Obsolete("BitmapEffects are deprecated and no longer function. Consider using Effects where appropriate instead.")>]
static member InitializeBitmapEffect : System.Runtime.InteropServices.SafeHandle * System.Runtime.InteropServices.SafeHandle -> unit
Protected Shared Sub InitializeBitmapEffect (outerObject As SafeHandle, innerObject As SafeHandle)
매개 변수
- outerObject
- SafeHandle
초기화할 외부 IMILBitmapEffect 래퍼입니다.
- innerObject
- SafeHandle
내부 IMILBitmapEffectPrimitive입니다.
- 특성
예제
다음 예제에서는 메서드를 사용하여 InitializeBitmapEffect 사용자 지정 효과로 래퍼 개체를 초기화하는 의 구현 CreateUnmanagedEffect 을 보여 있습니다.
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
적용 대상
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET