Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
21e691b
Product changes to enable comwrappers on linux
Jun 28, 2021
480622c
Some enhancement (ArraySize, Stowed exception exclusion, etc.)
Jun 29, 2021
d6dcd0e
Further enhancements + gcenv.ee.cpp change for build failures
Jun 30, 2021
703a59c
Array size definition moved below windows.h
Jul 1, 2021
550ae66
MockReferenceTrackerRuntime test project changes for Linux
Jul 1, 2021
f3cf786
Use FALLTHROUGH macro in place of [[fallthrough]]
Jul 1, 2021
d0b90ec
WeakReference test project changes for Linux
Jul 7, 2021
3b5ed87
Moved back comhelpers.h code from xplatform.h
Jul 12, 2021
ebc4fd2
OBJC_TEST logic to avoid OSX errors
Jul 16, 2021
c0a8dae
Fix for GCC pipeline errors
Jul 20, 2021
54c4ef0
Merge remote-tracking branch 'upstream/main' into enable-comwrappers-…
Jul 20, 2021
4d4761e
Arraysize result comparison error
Jul 20, 2021
e07ee91
Fix IID_IReferenceTracker GUID typo
Jul 21, 2021
dad8d0d
QueryInterface implementation and other minor changes
Jul 26, 2021
f09372b
UnknowImpl fix to remove WIN32 constructor cases
Jul 26, 2021
371d6a2
UnknownImpl error fix
Jul 26, 2021
ce9806c
Included ComWrappers Managed tests
Jul 26, 2021
85db0ed
Excluded Unix ComWrappers test for Mono
Jul 27, 2021
2d93161
Disabled comwrappers test for mono + other code enhancements
Jul 28, 2021
bff18a9
Enable interop info sync block cleanup under FEATURE_COMWRAPPERS
elinor-fung Jul 28, 2021
52587fc
Fix local instance ComWrappers WeakReference tests
elinor-fung Jul 28, 2021
22ed7de
Enable NativeComWeakHandleInfo under FEATURE_COMWRAPPERS
elinor-fung Jul 28, 2021
ac12e83
weakreferencenative.cpp and ComHelpers.h code enhancements
Jul 29, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/coreclr/clr.featuredefines.props
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<FeaturePortableShuffleThunks Condition="'$(Platform)' != 'x86'">true</FeaturePortableShuffleThunks>
<FeatureInstantiatingStubAsIL>true</FeatureInstantiatingStubAsIL>
<FeatureStubsAsIL>true</FeatureStubsAsIL>
<FeatureComWrappers>true</FeatureComWrappers>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetsWindows)' == 'true'">
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/clrfeatures.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ if(NOT DEFINED FEATURE_SINGLE_FILE_DIAGNOSTICS)
set(FEATURE_SINGLE_FILE_DIAGNOSTICS 1)
endif(NOT DEFINED FEATURE_SINGLE_FILE_DIAGNOSTICS)

if (CLR_CMAKE_TARGET_WIN32)
if (CLR_CMAKE_TARGET_WIN32 OR CLR_CMAKE_TARGET_UNIX)
set(FEATURE_COMWRAPPERS 1)
endif()

Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/debug/daccess/dacimpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -1323,7 +1323,7 @@ class ClrDataAccess
HRESULT DumpManagedObject(CLRDataEnumMemoryFlags flags, OBJECTREF objRef);
HRESULT DumpManagedExcepObject(CLRDataEnumMemoryFlags flags, OBJECTREF objRef);
HRESULT DumpManagedStackTraceStringObject(CLRDataEnumMemoryFlags flags, STRINGREF orefStackTrace);
#if defined(FEATURE_COMINTEROP) || defined(FEATURE_COMWRAPPERS)
#if (defined(FEATURE_COMINTEROP) || defined(FEATURE_COMWRAPPERS)) && !defined(TARGET_UNIX)
HRESULT DumpStowedExceptionObject(CLRDataEnumMemoryFlags flags, CLRDATA_ADDRESS ccwPtr);
HRESULT EnumMemStowedException(CLRDataEnumMemoryFlags flags);
#endif
Expand Down
6 changes: 3 additions & 3 deletions src/coreclr/debug/daccess/enummem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1065,7 +1065,7 @@ HRESULT ClrDataAccess::EnumMemDumpAllThreadsStack(CLRDataEnumMemoryFlags flags)
{
SUPPORTS_DAC;

#if defined(FEATURE_COMINTEROP) || defined(FEATURE_COMWRAPPERS)
#if (defined(FEATURE_COMINTEROP) || defined(FEATURE_COMWRAPPERS)) && !defined(TARGET_UNIX)
// Dump the exception object stored in the WinRT stowed exception
EnumMemStowedException(flags);
#endif // defined(FEATURE_COMINTEROP) || defined(FEATURE_COMWRAPPERS)
Expand Down Expand Up @@ -1298,7 +1298,7 @@ HRESULT ClrDataAccess::EnumMemDumpAllThreadsStack(CLRDataEnumMemoryFlags flags)
}


#if defined(FEATURE_COMINTEROP) || defined(FEATURE_COMWRAPPERS)
#if (defined(FEATURE_COMINTEROP) || defined(FEATURE_COMWRAPPERS)) && !defined(TARGET_UNIX)
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//
// WinRT stowed exception holds the (CCW)pointer to a managed exception object.
Expand Down Expand Up @@ -1405,7 +1405,7 @@ HRESULT ClrDataAccess::EnumMemStowedException(CLRDataEnumMemoryFlags flags)
ReportMem(remoteStowedException, sizeof(STOWED_EXCEPTION_INFORMATION_HEADER));

// check if this is a v2 stowed exception
STOWED_EXCEPTION_INFORMATION_V2 stowedException = { 0 };
STOWED_EXCEPTION_INFORMATION_V2 stowedException = { {0} };
if (FAILED(m_pTarget->ReadVirtual(TO_CDADDR(remoteStowedException),
(PBYTE)&stowedException, sizeof(STOWED_EXCEPTION_INFORMATION_HEADER), &bytesRead))
|| bytesRead != sizeof(STOWED_EXCEPTION_INFORMATION_HEADER)
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/dlls/mscorrc/mscorrc.rc
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,9 @@ BEGIN
IDS_EE_INTEROP_STUB_CA_NO_ACCESS_TO_STUB_METHOD "The interop method '%1' cannot access the stub method '%2' specified in ManagedToNativeComInteropStubAttribute. Please make sure they have compatible access modifiers and security accessibility."
#endif // FEATURE_COMINTEROP

#ifdef FEATURE_COMINTEROP
#if defined(FEATURE_COMINTEROP) || defined(FEATURE_COMWRAPPERS)
IDS_EE_NATIVE_COM_WEAKREF_BAD_TYPE "The object resolved by a native IWeakReference has an incompatible type for its managed WeakReference instance.\r\nExpected WeakReference target type: '%1'\r\nNative IWeakReference returned type: '%2'"
#endif // FEATURE_COMINTEROP
#endif // FEATURE_COMINTEROP || FEATURE_COMWRAPPERS

IDS_EE_INTEROP_CODE_SIZE_COMMENT "Code size"

Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/dlls/mscorrc/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -569,9 +569,9 @@
#define IDS_E_PROF_TIMEOUT_WAITING_FOR_CONCURRENT_GC 0x251D

#define IDS_EE_CANNOTCAST_NOMARSHAL 0x2629
#ifdef FEATURE_COMINTEROP
#if defined(FEATURE_COMINTEROP) || defined(FEATURE_COMWRAPPERS)
#define IDS_EE_NATIVE_COM_WEAKREF_BAD_TYPE 0x262e
#endif // FEATURE_COMINTEROP
#endif // FEATURE_COMINTEROP || FEATURE_COMWRAPPERS

#define IDS_HOST_ASSEMBLY_RESOLVER_ASSEMBLY_ALREADY_LOADED_IN_CONTEXT 0x2636
#define IDS_HOST_ASSEMBLY_RESOLVER_DYNAMICALLY_EMITTED_ASSEMBLIES_UNSUPPORTED 0x2637
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/gc/objecthandle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1379,9 +1379,9 @@ void Ref_CheckAlive(uint32_t condemned, uint32_t maxgen, uintptr_t lp1)
uint32_t types[] =
{
HNDTYPE_WEAK_SHORT
#ifdef FEATURE_COMINTEROP
#if defined(FEATURE_COMINTEROP) || defined(FEATURE_COMWRAPPERS)
, HNDTYPE_WEAK_NATIVE_COM
#endif // FEATURE_COMINTEROP
#endif // FEATURE_COMINTEROP || FEATURE_COMWRAPPERS
};
uint32_t flags = (((ScanContext*) lp1)->concurrent) ? HNDGCF_ASYNC : HNDGCF_NORMAL;

Expand Down
22 changes: 13 additions & 9 deletions src/coreclr/interop/comwrappers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
#include <interoplibimports.h>
#include <corerror.h>

#ifdef _WIN32
#include <new> // placement new
#endif // _WIN32


using OBJECTHANDLE = InteropLib::OBJECTHANDLE;
using AllocScenario = InteropLibImports::AllocScenario;
Expand Down Expand Up @@ -344,9 +347,9 @@ void ManagedObjectWrapper::GetIUnknownImpl(
&& fpAddRef != nullptr
&& fpRelease != nullptr);

*fpQueryInterface = ManagedObjectWrapper_IUnknownImpl.QueryInterface;
*fpAddRef = ManagedObjectWrapper_IUnknownImpl.AddRef;
*fpRelease = ManagedObjectWrapper_IUnknownImpl.Release;
*fpQueryInterface = (void*)ManagedObjectWrapper_IUnknownImpl.QueryInterface;
*fpAddRef = (void*)ManagedObjectWrapper_IUnknownImpl.AddRef;
*fpRelease = (void*)ManagedObjectWrapper_IUnknownImpl.Release;
}

// The logic here should match code:ClrDataAccess::DACTryGetComWrappersObjectFromCCW in daccess/request.cpp
Expand Down Expand Up @@ -393,11 +396,11 @@ HRESULT ManagedObjectWrapper::Create(
if ((flags & CreateComInterfaceFlagsEx::TrackerSupport) == CreateComInterfaceFlagsEx::TrackerSupport)
{
ABI::ComInterfaceEntry& curr = runtimeDefinedLocal[runtimeDefinedCount++];
curr.IID = __uuidof(IReferenceTrackerTarget);
curr.IID = IID_IReferenceTrackerTarget;
curr.Vtable = &ManagedObjectWrapper_IReferenceTrackerTargetImpl;
}

_ASSERTE(runtimeDefinedCount <= ARRAYSIZE(runtimeDefinedLocal));
_ASSERTE(runtimeDefinedCount <= (int) ARRAYSIZE(runtimeDefinedLocal));

// Compute size for ManagedObjectWrapper instance.
const size_t totalRuntimeDefinedSize = runtimeDefinedCount * sizeof(ABI::ComInterfaceEntry);
Expand Down Expand Up @@ -465,7 +468,7 @@ void ManagedObjectWrapper::Destroy(_In_ ManagedObjectWrapper* wrapper)
{
prev = wrapper->_refCount;
refCount = prev | DestroySentinel;
} while (::InterlockedCompareExchange64(&wrapper->_refCount, refCount, prev) != prev);
} while (InterlockedCompareExchange64(&wrapper->_refCount, refCount, prev) != prev);

// The destroy sentinel represents the bit that indicates the wrapper
// should be destroyed. Since the reference count field (64-bit) holds
Expand Down Expand Up @@ -547,7 +550,7 @@ void* ManagedObjectWrapper::As(_In_ REFIID riid)

bool ManagedObjectWrapper::TrySetObjectHandle(_In_ OBJECTHANDLE objectHandle, _In_ OBJECTHANDLE current)
{
return (::InterlockedCompareExchangePointer(&Target, objectHandle, current) == current);
return (InterlockedCompareExchangePointer(&Target, objectHandle, current) == current);
}

bool ManagedObjectWrapper::IsSet(_In_ CreateComInterfaceFlagsEx flag) const
Expand Down Expand Up @@ -666,6 +669,7 @@ HRESULT ManagedObjectWrapper::QueryInterface(

default:
_ASSERTE(false && "Unknown result value");
FALLTHROUGH;
case TryInvokeICustomQueryInterfaceResult::FailedToInvoke:
// Set the 'lacks' flag since our attempt to use ICustomQueryInterface
// indicated the object lacks an implementation.
Expand Down Expand Up @@ -744,7 +748,7 @@ HRESULT NativeObjectWrapperContext::Create(
ComHolder<IReferenceTracker> trackerObject;
if (flags & InteropLib::Com::CreateObjectFlags_TrackerObject)
{
hr = external->QueryInterface(&trackerObject);
hr = external->QueryInterface(IID_IReferenceTracker, (void**)&trackerObject);
if (SUCCEEDED(hr))
RETURN_IF_FAILED(TrackerObjectManager::OnIReferenceTrackerFound(trackerObject));
}
Expand Down
17 changes: 16 additions & 1 deletion src/coreclr/interop/comwrappers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,19 @@
#include <interoplibabi.h>
#include "referencetrackertypes.hpp"

#ifndef DEFINE_ENUM_FLAG_OPERATORS
#define DEFINE_ENUM_FLAG_OPERATORS(ENUMTYPE) \
extern "C++" { \
inline ENUMTYPE operator | (ENUMTYPE a, ENUMTYPE b) { return ENUMTYPE(((int)a)|((int)b)); } \
inline ENUMTYPE operator |= (ENUMTYPE &a, ENUMTYPE b) { return (ENUMTYPE &)(((int &)a) |= ((int)b)); } \
inline ENUMTYPE operator & (ENUMTYPE a, ENUMTYPE b) { return ENUMTYPE(((int)a)&((int)b)); } \
inline ENUMTYPE operator &= (ENUMTYPE &a, ENUMTYPE b) { return (ENUMTYPE &)(((int &)a) &= ((int)b)); } \
inline ENUMTYPE operator ~ (ENUMTYPE a) { return (ENUMTYPE)(~((int)a)); } \
inline ENUMTYPE operator ^ (ENUMTYPE a, ENUMTYPE b) { return ENUMTYPE(((int)a)^((int)b)); } \
inline ENUMTYPE operator ^= (ENUMTYPE &a, ENUMTYPE b) { return (ENUMTYPE &)(((int &)a) ^= ((int)b)); } \
}
#endif

enum class CreateComInterfaceFlagsEx : int32_t
{
None = InteropLib::Com::CreateComInterfaceFlags_None,
Expand All @@ -32,6 +45,8 @@ namespace ABI
struct ComInterfaceEntry;
}

static constexpr size_t ManagedObjectWrapperRefCountOffset();

// Class for wrapping a managed object and projecting it in a non-managed environment
class ManagedObjectWrapper
{
Expand Down Expand Up @@ -159,7 +174,7 @@ class NativeObjectWrapperContext
static NativeObjectWrapperContext* MapFromRuntimeContext(_In_ void* cxt);

// Create a NativeObjectWrapperContext instance
static HRESULT NativeObjectWrapperContext::Create(
static HRESULT Create(
_In_ IUnknown* external,
_In_opt_ IUnknown* nativeObjectAsInner,
_In_ InteropLib::Com::CreateObjectFlags flags,
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/interop/interoplib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,15 @@ namespace InteropLib
// interface QI. Once we have the IReferenceTracker
// instance we can be sure the QI for IUnknown will really
// be the true identity.
HRESULT hr = external->QueryInterface(&trackerObject);
HRESULT hr = external->QueryInterface(IID_IReferenceTracker, (void**)&trackerObject);
if (SUCCEEDED(hr))
checkForIdentity = trackerObject.p;
}

HRESULT hr;

IUnknown* identityLocal;
RETURN_IF_FAILED(checkForIdentity->QueryInterface(&identityLocal));
RETURN_IF_FAILED(checkForIdentity->QueryInterface(IID_IUnknown, (void **)&identityLocal));

// Set the inner if scenario dictates an update.
if (*innerMaybe == nullptr // User didn't supply inner - .NET 5 API scenario sanity check.
Expand Down
10 changes: 8 additions & 2 deletions src/coreclr/interop/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,19 @@

#ifdef _WIN32
#include <Windows.h>
#endif // _WIN32

#ifndef ARRAYSIZE
#define ARRAYSIZE(x) (sizeof(x)/sizeof(x[0]))
#endif // !ARRAYSIZE

#if defined(_WIN32) || defined(HOST_UNIX)
#include <objidl.h> // COM interfaces

// Common macro for working in COM
#define RETURN_IF_FAILED(exp) { hr = exp; if (FAILED(hr)) { _ASSERTE(false && #exp); return hr; } }
#define RETURN_VOID_IF_FAILED(exp) { hr = exp; if (FAILED(hr)) { _ASSERTE(false && #exp); return; } }

#endif // _WIN32
#endif // defined(_WIN32) || defined(HOST_UNIX)

#define ABI_ASSERT(abi_definition) static_assert((abi_definition), "ABI is being invalidated.")

Expand Down
6 changes: 6 additions & 0 deletions src/coreclr/interop/referencetrackertypes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@

// Documentation found at https://docs.microsoft.com/windows/win32/api/windows.ui.xaml.hosting.referencetracker/

//64bd43f8-bfee-4ec4-b7eb-2935158dae21
const GUID IID_IReferenceTrackerTarget = { 0x64bd43f8, 0xbfee, 0x4ec4, { 0xb7, 0xeb, 0x29, 0x35, 0x15, 0x8d, 0xae, 0x21} };

class DECLSPEC_UUID("64bd43f8-bfee-4ec4-b7eb-2935158dae21") IReferenceTrackerTarget : public IUnknown
{
public:
Expand Down Expand Up @@ -43,6 +46,9 @@ class DECLSPEC_UUID("04b3486c-4687-4229-8d14-505ab584dd88") IFindReferenceTarget
STDMETHOD(FoundTrackerTarget)(_In_ IReferenceTrackerTarget* target) = 0;
};

//11d3b13a-180e-4789-a8be-7712882893e6
const GUID IID_IReferenceTracker = { 0x11d3b13a, 0x180e, 0x4789, { 0xa8, 0xbe, 0x77, 0x12, 0x88, 0x28, 0x93, 0xe6} };

class DECLSPEC_UUID("11d3b13a-180e-4789-a8be-7712882893e6") IReferenceTracker : public IUnknown
{
public:
Expand Down
18 changes: 11 additions & 7 deletions src/coreclr/interop/trackerobjectmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@ using RuntimeCallContext = InteropLibImports::RuntimeCallContext;

namespace
{
const IID IID_IReferenceTrackerHost = __uuidof(IReferenceTrackerHost);
const IID IID_IReferenceTrackerTarget = __uuidof(IReferenceTrackerTarget);
const IID IID_IReferenceTracker = __uuidof(IReferenceTracker);
const IID IID_IReferenceTrackerManager = __uuidof(IReferenceTrackerManager);
const IID IID_IFindReferenceTargetsCallback = __uuidof(IFindReferenceTargetsCallback);

//29a71c6a-3c42-4416-a39d-e2825a07a773
const GUID IID_IReferenceTrackerHost = { 0x29a71c6a, 0x3c42, 0x4416, { 0xa3, 0x9d, 0xe2, 0x82, 0x5a, 0x7, 0xa7, 0x73} };

//3cf184b4-7ccb-4dda-8455-7e6ce99a3298
const GUID IID_IReferenceTrackerManager = { 0x3cf184b4, 0x7ccb, 0x4dda, { 0x84, 0x55, 0x7e, 0x6c, 0xe9, 0x9a, 0x32, 0x98} };

//04b3486c-4687-4229-8d14-505ab584dd88
const GUID IID_IFindReferenceTargetsCallback = { 0x04b3486c, 0x4687, 0x4229, { 0x8d, 0x14, 0x50, 0x5a, 0xb5, 0x84, 0xdd, 0x88} };

// In order to minimize the impact of a constructor running on module load,
// the HostServices class should have no instance fields.
Expand Down Expand Up @@ -120,7 +124,7 @@ namespace

// QI for IUnknown to get the identity unknown
ComHolder<IUnknown> identity;
RETURN_IF_FAILED(obj->QueryInterface(&identity));
RETURN_IF_FAILED(obj->QueryInterface(IID_IUnknown, (void**)&identity));

// Get or create an existing implementation for this external.
ComHolder<IUnknown> target;
Expand Down Expand Up @@ -274,7 +278,7 @@ HRESULT TrackerObjectManager::OnIReferenceTrackerFound(_In_ IReferenceTracker* o
RETURN_IF_FAILED(g_HostServicesInstance.QueryInterface(IID_IReferenceTrackerHost, (void**)&hostServices));

// Attempt to set the tracker instance.
if (::InterlockedCompareExchangePointer((void**)&s_TrackerManager, trackerManager.p, nullptr) == nullptr)
if (InterlockedCompareExchangePointer((void**)&s_TrackerManager, trackerManager.p, nullptr) == nullptr)
{
(void)trackerManager.Detach(); // Ownership has been transfered
RETURN_IF_FAILED(s_TrackerManager->SetReferenceTrackerHost(hostServices));
Expand Down
85 changes: 85 additions & 0 deletions src/coreclr/pal/inc/rt/weakreference.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
//

//
// ===========================================================================
// File: weakreference.h
//
// ===========================================================================
// simplified weakreference.h for PAL

#include "rpc.h"
#include "rpcndr.h"

#include "unknwn.h"

#ifndef __IInspectable_INTERFACE_DEFINED__
#define __IInspectable_INTERFACE_DEFINED__

typedef struct HSTRING__{
int unused;
} HSTRING__;

typedef HSTRING__* HSTRING;

typedef /* [v1_enum] */
enum TrustLevel
{
BaseTrust = 0,
PartialTrust = ( BaseTrust + 1 ) ,
FullTrust = ( PartialTrust + 1 )
} TrustLevel;

// AF86E2E0-B12D-4c6a-9C5A-D7AA65101E90
const IID IID_IInspectable = { 0xaf86e2e0, 0xb12d, 0x4c6a, { 0x9c, 0x5a, 0xd7, 0xaa, 0x65, 0x10, 0x1e, 0x90} };

MIDL_INTERFACE("AF86E2E0-B12D-4c6a-9C5A-D7AA65101E90")
IInspectable : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE GetIids(
/* [out] */ ULONG * iidCount,
/* [size_is][size_is][out] */ IID * *iids) = 0;

virtual HRESULT STDMETHODCALLTYPE GetRuntimeClassName(
/* [out] */ HSTRING * className) = 0;

virtual HRESULT STDMETHODCALLTYPE GetTrustLevel(
/* [out] */ TrustLevel * trustLevel) = 0;
};
#endif // __IInspectable_INTERFACE_DEFINED__

#ifndef __IWeakReference_INTERFACE_DEFINED__
#define __IWeakReference_INTERFACE_DEFINED__

// 00000037-0000-0000-C000-000000000046
const IID IID_IWeakReference = { 0x00000037, 0x0000, 0x0000, { 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46} };

MIDL_INTERFACE("00000037-0000-0000-C000-000000000046")
IWeakReference : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE Resolve(
/* [in] */ REFIID riid,
/* [iid_is][out] */ IInspectable **objectReference) = 0;

};

#endif // __IWeakReference_INTERFACE_DEFINED__

#ifndef __IWeakReferenceSource_INTERFACE_DEFINED__
#define __IWeakReferenceSource_INTERFACE_DEFINED__

// 00000038-0000-0000-C000-000000000046
const IID IID_IWeakReferenceSource = { 0x00000038, 0x0000, 0x0000, { 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46} };

MIDL_INTERFACE("00000038-0000-0000-C000-000000000046")
IWeakReferenceSource : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE GetWeakReference(
/* [retval][out] */ IWeakReference * *weakReference) = 0;
};

#endif // __IWeakReferenceSource_INTERFACE_DEFINED__
Loading