windowscodecs: Silence fixme for IID_CMetaBitmapRenderTarget.
[wine.git] / dlls / twinapi.appcore / private.h
blob7063962e2b4b1f4f187e882454c7ab9cd5906dd0
1 /*
2 * Copyright 2023 RĂ©mi Bernon for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #include <stdarg.h>
20 #include <stddef.h>
22 #include "windef.h"
23 #include "winbase.h"
25 #define COBJMACROS
26 #include "winstring.h"
27 #include "appnotify.h"
28 #include "activation.h"
30 #define WIDL_using_Windows_Foundation
31 #define WIDL_using_Windows_Foundation_Collections
32 #include "windows.foundation.h"
33 #define WIDL_using_Windows_Security_ExchangeActiveSyncProvisioning
34 #include "windows.security.exchangeactivesyncprovisioning.h"
35 #define WIDL_using_Windows_System_Profile
36 #include "windows.system.profile.h"
37 #define WIDL_using_Windows_System_UserProfile
38 #include "windows.system.userprofile.h"
40 #include "wine/debug.h"
42 #include "wine/debug.h"
44 extern IActivationFactory *client_device_information_factory;
45 extern IActivationFactory *analytics_info_factory;
46 extern IActivationFactory *advertising_manager_factory;
48 #define DEFINE_IINSPECTABLE_( pfx, iface_type, impl_type, impl_from, iface_mem, expr ) \
49 static inline impl_type *impl_from( iface_type *iface ) \
50 { \
51 return CONTAINING_RECORD( iface, impl_type, iface_mem ); \
52 } \
53 static HRESULT WINAPI pfx##_QueryInterface( iface_type *iface, REFIID iid, void **out ) \
54 { \
55 impl_type *impl = impl_from( iface ); \
56 return IInspectable_QueryInterface( (IInspectable *)(expr), iid, out ); \
57 } \
58 static ULONG WINAPI pfx##_AddRef( iface_type *iface ) \
59 { \
60 impl_type *impl = impl_from( iface ); \
61 return IInspectable_AddRef( (IInspectable *)(expr) ); \
62 } \
63 static ULONG WINAPI pfx##_Release( iface_type *iface ) \
64 { \
65 impl_type *impl = impl_from( iface ); \
66 return IInspectable_Release( (IInspectable *)(expr) ); \
67 } \
68 static HRESULT WINAPI pfx##_GetIids( iface_type *iface, ULONG *iid_count, IID **iids ) \
69 { \
70 impl_type *impl = impl_from( iface ); \
71 return IInspectable_GetIids( (IInspectable *)(expr), iid_count, iids ); \
72 } \
73 static HRESULT WINAPI pfx##_GetRuntimeClassName( iface_type *iface, HSTRING *class_name ) \
74 { \
75 impl_type *impl = impl_from( iface ); \
76 return IInspectable_GetRuntimeClassName( (IInspectable *)(expr), class_name ); \
77 } \
78 static HRESULT WINAPI pfx##_GetTrustLevel( iface_type *iface, TrustLevel *trust_level ) \
79 { \
80 impl_type *impl = impl_from( iface ); \
81 return IInspectable_GetTrustLevel( (IInspectable *)(expr), trust_level ); \
83 #define DEFINE_IINSPECTABLE( pfx, iface_type, impl_type, base_iface ) \
84 DEFINE_IINSPECTABLE_( pfx, iface_type, impl_type, impl_from_##iface_type, iface_type##_iface, &impl->base_iface )