-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Less clever #includes for IWeakReference (#153)
- Loading branch information
1 parent
d7683d3
commit 54f6187
Showing
6 changed files
with
66 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
// The real weakreference.h will provide different definitions in C vs C++ compilation mode. | ||
// Override it with ours so we ensure we get the C definitions. | ||
|
||
#include <objidl.h> | ||
#include <inspectable.h> | ||
|
||
#ifndef _IWEAKREFERENCE_DEFINED | ||
#define _IWEAKREFERENCE_DEFINED | ||
typedef interface IWeakReference IWeakReference; | ||
#endif | ||
|
||
typedef struct IWeakReferenceVtbl | ||
{ | ||
BEGIN_INTERFACE | ||
|
||
HRESULT (STDMETHODCALLTYPE* QueryInterface)(__RPC__in IWeakReference* This, | ||
REFIID riid, | ||
_COM_Outptr_ void** ppvObject); | ||
ULONG (STDMETHODCALLTYPE* AddRef)(__RPC__in IWeakReference* This); | ||
ULONG (STDMETHODCALLTYPE* Release)(__RPC__in IWeakReference* This); | ||
HRESULT (STDMETHODCALLTYPE* Resolve)(__RPC__in IWeakReference* This, | ||
__RPC__in REFIID riid, | ||
__RPC__deref_out_opt IInspectable **objectReference); | ||
|
||
END_INTERFACE | ||
} IWeakReferenceVtbl; | ||
|
||
interface IWeakReference | ||
{ | ||
CONST_VTBL struct IWeakReferenceVtbl* lpVtbl; | ||
}; | ||
|
||
#ifndef _IWEAKREFERENCESOURCE_DEFINED | ||
#define _IWEAKREFERENCESOURCE_DEFINED | ||
typedef interface IWeakReferenceSource IWeakReferenceSource; | ||
#endif | ||
|
||
typedef struct IWeakReferenceSourceVtbl | ||
{ | ||
BEGIN_INTERFACE | ||
|
||
HRESULT (STDMETHODCALLTYPE* QueryInterface)(__RPC__in IWeakReferenceSource* This, | ||
REFIID riid, | ||
_COM_Outptr_ void** ppvObject); | ||
ULONG (STDMETHODCALLTYPE* AddRef)(__RPC__in IWeakReferenceSource* This); | ||
ULONG (STDMETHODCALLTYPE* Release)(__RPC__in IWeakReferenceSource* This); | ||
HRESULT (STDMETHODCALLTYPE* GetWeakReference)(__RPC__in IWeakReferenceSource* This, | ||
__RPC__deref_out_opt IWeakReference **weakReference); | ||
|
||
END_INTERFACE | ||
} IWeakReferenceSourceVtbl; | ||
|
||
interface IWeakReferenceSource | ||
{ | ||
CONST_VTBL struct IWeakReferenceSourceVtbl* lpVtbl; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters