-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Implement new ComWrappers.CreateObject API #115437
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
namespace System.Runtime.InteropServices | ||
{ | ||
/// <summary> | ||
/// Enumeration of flags for <see cref="ComWrappers.CreateObject(IntPtr, CreateObjectFlags, object, out CreatedWrapperFlags)"/>. | ||
Check failure on line 7 in src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/CreatedWrapperFlags.cs
|
||
/// </summary> | ||
[Flags] | ||
public enum CreatedWrapperFlags | ||
{ | ||
None = 0, | ||
|
||
/// <summary> | ||
/// Indicate if the supplied external COM object implements the <see href="https://learn.microsoft.com/windows/win32/api/windows.ui.xaml.hosting.referencetracker/nn-windows-ui-xaml-hosting-referencetracker-ireferencetracker">IReferenceTracker</see>. | ||
/// </summary> | ||
TrackerObject = 1, | ||
|
||
/// <summary> | ||
/// The managed object doesn't keep the native object alive. It represents an equivalent value. | ||
/// </summary> | ||
/// <remarks> | ||
/// Using this flag results in the following changes: | ||
/// <see cref="ComWrappers.TryGetComInstance" /> will return <c>false</c> for the returned object. | ||
/// The features provided by the <see cref="CreateObjectFlags.TrackerObject" /> flag will be disabled. | ||
/// Integration between <see cref="WeakReference" /> and the returned object via the native <c>IWeakReferenceSource</c> interface will not work. | ||
/// <see cref="CreateObjectFlags.UniqueInstance" /> behavior is implied. | ||
/// Diagnostics tooling support to unwrap objects returned by `CreateObject` will not see this object as a wrapper. | ||
/// The same object can be returned from `CreateObject` wrapping different COM objects. | ||
/// </remarks> | ||
NonWrapping = 0x2 | ||
} | ||
} |
Uh oh!
There was an error while loading. Please reload this page.