/usr/share/mingw-w64/include/combaseapi.h is in mingw-w64-common 4.0.4-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 | /**
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#include <apiset.h>
#include <apisetcconv.h>
#include <rpc.h>
#include <rpcndr.h>
#ifndef DECLSPEC_NOTHROW
#define DECLSPEC_NOTHROW
#endif
#if (NTDDI_VERSION >= 0x06000000 && !defined (_WIN32_WINNT))
#define _WIN32_WINNT 0x0600
#endif
#if (NTDDI_VERSION >= 0x05020000 && !defined (_WIN32_WINNT))
#define _WIN32_WINNT 0x0502
#endif
#if (NTDDI_VERSION >= 0x05010000 && !defined (_WIN32_WINNT))
#define _WIN32_WINNT 0x0501
#endif
#ifndef _COMBASEAPI_H_
#define _COMBASEAPI_H_
#include <pshpack8.h>
#ifdef _OLE32_
#define WINOLEAPI STDAPI
#define WINOLEAPI_(type) STDAPI_(type)
#else
#define WINOLEAPI EXTERN_C DECLSPEC_IMPORT HRESULT STDAPICALLTYPE
#define WINOLEAPI_(type) EXTERN_C DECLSPEC_IMPORT type STDAPICALLTYPE
#endif
#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_APP)
#if defined (__cplusplus) && !defined (CINTERFACE)
#ifdef COM_STDMETHOD_CAN_THROW
#define COM_DECLSPEC_NOTHROW
#else
#define COM_DECLSPEC_NOTHROW DECLSPEC_NOTHROW
#endif
#define __STRUCT__ struct
#undef interface
#define interface __STRUCT__
#define STDMETHOD(method) virtual COM_DECLSPEC_NOTHROW HRESULT STDMETHODCALLTYPE method
#define STDMETHOD_(type, method) virtual COM_DECLSPEC_NOTHROW type STDMETHODCALLTYPE method
#define STDMETHODV(method) virtual COM_DECLSPEC_NOTHROW HRESULT STDMETHODVCALLTYPE method
#define STDMETHODV_(type, method) virtual COM_DECLSPEC_NOTHROW type STDMETHODVCALLTYPE method
#define PURE = 0
#define THIS_
#define THIS void
#define DECLARE_INTERFACE(iface) interface DECLSPEC_NOVTABLE iface
#define DECLARE_INTERFACE_(iface, baseiface) interface DECLSPEC_NOVTABLE iface : public baseiface
#define DECLARE_INTERFACE_IID(iface, iid) interface DECLSPEC_UUID (iid) DECLSPEC_NOVTABLE iface
#define DECLARE_INTERFACE_IID_(iface, baseiface, iid) interface DECLSPEC_UUID (iid) DECLSPEC_NOVTABLE iface : public baseiface
#define IFACEMETHOD(method) STDMETHOD (method)
#define IFACEMETHOD_(type, method) STDMETHOD_(type, method)
#define IFACEMETHODV(method) STDMETHODV (method)
#define IFACEMETHODV_(type, method) STDMETHODV_(type, method)
#ifndef BEGIN_INTERFACE
#define BEGIN_INTERFACE
#define END_INTERFACE
#endif
interface IUnknown;
extern "C++" {
template<typename T> void **IID_PPV_ARGS_Helper (T **pp) {
static_cast<IUnknown *> (*pp);
return reinterpret_cast<void **> (pp);
}
}
#define IID_PPV_ARGS(ppType) __uuidof (**(ppType)), IID_PPV_ARGS_Helper (ppType)
#else
#undef interface
#define interface struct
#define STDMETHOD(method) HRESULT (STDMETHODCALLTYPE *method)
#define STDMETHOD_(type, method) type (STDMETHODCALLTYPE *method)
#define STDMETHODV(method) HRESULT (STDMETHODVCALLTYPE *method)
#define STDMETHODV_(type, method) type (STDMETHODVCALLTYPE *method)
#define IFACEMETHOD(method) STDMETHOD (method)
#define IFACEMETHOD_(type, method) STDMETHOD_ (type, method)
#define IFACEMETHODV(method) STDMETHODV (method)
#define IFACEMETHODV_(type, method) STDMETHODV_ (type, method)
#ifndef BEGIN_INTERFACE
#define BEGIN_INTERFACE
#define END_INTERFACE
#endif
#define PURE
#define THIS_ INTERFACE *This,
#define THIS INTERFACE *This
#ifdef CONST_VTABLE
#undef CONST_VTBL
#define CONST_VTBL const
#define DECLARE_INTERFACE(iface) typedef interface iface { const struct iface##Vtbl *lpVtbl; } iface; typedef const struct iface##Vtbl iface##Vtbl; const struct iface##Vtbl
#else
#undef CONST_VTBL
#define CONST_VTBL
#define DECLARE_INTERFACE(iface) typedef interface iface { struct iface##Vtbl *lpVtbl; } iface; typedef struct iface##Vtbl iface##Vtbl; struct iface##Vtbl
#endif
#define DECLARE_INTERFACE_(iface, baseiface) DECLARE_INTERFACE (iface)
#define DECLARE_INTERFACE_IID(iface, iid) DECLARE_INTERFACE (iface)
#define DECLARE_INTERFACE_IID_(iface, baseiface, iid) DECLARE_INTERFACE_ (iface, baseiface)
#endif
#ifndef FARSTRUCT
#define FARSTRUCT
#endif
#ifndef HUGEP
#define HUGEP
#endif
#include <stdlib.h>
#define LISet32(li, v) ((li).HighPart = ((LONG) (v)) < 0 ? -1 : 0,(li).LowPart = (v))
#define ULISet32(li, v) ((li).HighPart = 0,(li).LowPart = (v))
#define CLSCTX_INPROC (CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER)
#define CLSCTX_ALL (CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER | CLSCTX_LOCAL_SERVER | CLSCTX_REMOTE_SERVER)
#define CLSCTX_SERVER (CLSCTX_INPROC_SERVER | CLSCTX_LOCAL_SERVER | CLSCTX_REMOTE_SERVER)
typedef enum tagREGCLS {
REGCLS_SINGLEUSE = 0,
REGCLS_MULTIPLEUSE = 1,
REGCLS_MULTI_SEPARATE = 2,
REGCLS_SUSPENDED = 4,
REGCLS_SURROGATE = 8
} REGCLS;
typedef interface IRpcStubBuffer IRpcStubBuffer;
typedef interface IRpcChannelBuffer IRpcChannelBuffer;
typedef enum tagCOINITBASE {
COINITBASE_MULTITHREADED = 0x0,
} COINITBASE;
#include <wtypesbase.h>
#include <unknwnbase.h>
#include <objidlbase.h>
#include <guiddef.h>
#ifndef INITGUID
#include <cguid.h>
#endif
#endif
#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_APP)
#if NTDDI_VERSION >= 0x06020000
typedef struct tagServerInformation {
DWORD dwServerPid;
DWORD dwServerTid;
UINT64 ui64ServerAddress;
} ServerInformation,*PServerInformation;
DECLARE_HANDLE (CO_MTA_USAGE_COOKIE);
#endif
WINOLEAPI CreateStreamOnHGlobal (HGLOBAL hGlobal, WINBOOL fDeleteOnRelease, LPSTREAM *ppstm);
WINOLEAPI GetHGlobalFromStream (LPSTREAM pstm, HGLOBAL *phglobal);
WINOLEAPI_(void) CoUninitialize (void);
WINOLEAPI CoInitializeEx (LPVOID pvReserved, DWORD dwCoInit);
WINOLEAPI CoGetCurrentLogicalThreadId (GUID *pguid);
WINOLEAPI CoGetContextToken (ULONG_PTR *pToken);
#if NTDDI_VERSION >= 0x06010000
WINOLEAPI CoGetApartmentType (APTTYPE *pAptType, APTTYPEQUALIFIER *pAptQualifier);
#endif
WINOLEAPI CoGetObjectContext (REFIID riid, LPVOID *ppv);
WINOLEAPI CoRegisterClassObject (REFCLSID rclsid, LPUNKNOWN pUnk, DWORD dwClsContext, DWORD flags, LPDWORD lpdwRegister);
WINOLEAPI CoRevokeClassObject (DWORD dwRegister);
WINOLEAPI CoResumeClassObjects (void);
WINOLEAPI CoSuspendClassObjects (void);
#endif
#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
WINOLEAPI CoGetMalloc (DWORD dwMemContext, LPMALLOC *ppMalloc);
WINOLEAPI_(DWORD) CoGetCurrentProcess (void);
WINOLEAPI CoGetCallerTID (LPDWORD lpdwTID);
WINOLEAPI CoGetDefaultContext (APTTYPE aptType, REFIID riid, void **ppv);
#if NTDDI_VERSION >= 0x06020000
WINOLEAPI CoDecodeProxy (DWORD dwClientPid, UINT64 ui64ProxyAddress, PServerInformation pServerInformation);
WINOLEAPI CoIncrementMTAUsage (CO_MTA_USAGE_COOKIE *pCookie);
WINOLEAPI CoDecrementMTAUsage (CO_MTA_USAGE_COOKIE Cookie);
WINOLEAPI CoWaitForMultipleObjects (DWORD dwFlags, DWORD dwTimeout, ULONG cHandles, const HANDLE *pHandles, LPDWORD lpdwindex);
WINOLEAPI CoAllowUnmarshalerCLSID (REFCLSID clsid);
#endif
WINOLEAPI CoGetClassObject (REFCLSID rclsid, DWORD dwClsContext, LPVOID pvReserved, REFIID riid, LPVOID *ppv);
WINOLEAPI_(ULONG) CoAddRefServerProcess (void);
WINOLEAPI_(ULONG) CoReleaseServerProcess (void);
WINOLEAPI CoGetPSClsid (REFIID riid, CLSID *pClsid);
WINOLEAPI CoRegisterPSClsid (REFIID riid, REFCLSID rclsid);
WINOLEAPI CoRegisterSurrogate (LPSURROGATE pSurrogate);
WINOLEAPI CoMarshalHresult (LPSTREAM pstm, HRESULT hresult);
WINOLEAPI CoUnmarshalHresult (LPSTREAM pstm, HRESULT *phresult);
WINOLEAPI CoLockObjectExternal (LPUNKNOWN pUnk, WINBOOL fLock, WINBOOL fLastUnlockReleases);
WINOLEAPI CoGetStdMarshalEx (LPUNKNOWN pUnkOuter, DWORD smexflags, LPUNKNOWN *ppUnkInner);
#endif
#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_APP)
typedef enum tagSTDMSHLFLAGS {
SMEXF_SERVER = 0x01,
SMEXF_HANDLER = 0x02
} STDMSHLFLAGS;
WINOLEAPI CoGetMarshalSizeMax (ULONG *pulSize, REFIID riid, LPUNKNOWN pUnk, DWORD dwDestContext, LPVOID pvDestContext, DWORD mshlflags);
WINOLEAPI CoMarshalInterface (LPSTREAM pStm, REFIID riid, LPUNKNOWN pUnk, DWORD dwDestContext, LPVOID pvDestContext, DWORD mshlflags);
WINOLEAPI CoUnmarshalInterface (LPSTREAM pStm, REFIID riid, LPVOID *ppv);
WINOLEAPI CoReleaseMarshalData (LPSTREAM pStm);
WINOLEAPI CoDisconnectObject (LPUNKNOWN pUnk, DWORD dwReserved);
WINOLEAPI CoGetStandardMarshal (REFIID riid, LPUNKNOWN pUnk, DWORD dwDestContext, LPVOID pvDestContext, DWORD mshlflags, LPMARSHAL *ppMarshal);
WINOLEAPI CoMarshalInterThreadInterfaceInStream (REFIID riid, LPUNKNOWN pUnk, LPSTREAM *ppStm);
WINOLEAPI CoGetInterfaceAndReleaseStream (LPSTREAM pStm, REFIID iid, LPVOID *ppv);
WINOLEAPI CoCreateFreeThreadedMarshaler (LPUNKNOWN punkOuter, LPUNKNOWN *ppunkMarshal);
WINOLEAPI_(void) CoFreeUnusedLibraries (void);
WINOLEAPI_(void) CoFreeUnusedLibrariesEx (DWORD dwUnloadDelay, DWORD dwReserved);
WINOLEAPI CoInitializeSecurity (PSECURITY_DESCRIPTOR pSecDesc, LONG cAuthSvc, SOLE_AUTHENTICATION_SERVICE *asAuthSvc, void *pReserved1, DWORD dwAuthnLevel, DWORD dwImpLevel, void *pAuthList, DWORD dwCapabilities, void *pReserved3);
WINOLEAPI CoSwitchCallContext (IUnknown *pNewObject, IUnknown **ppOldObject);
#define COM_RIGHTS_EXECUTE 1
#define COM_RIGHTS_EXECUTE_LOCAL 2
#define COM_RIGHTS_EXECUTE_REMOTE 4
#define COM_RIGHTS_ACTIVATE_LOCAL 8
#define COM_RIGHTS_ACTIVATE_REMOTE 16
WINOLEAPI CoCreateInstanceFromApp (REFCLSID Clsid, IUnknown *punkOuter, DWORD dwClsCtx, PVOID reserved, DWORD dwCount, MULTI_QI *pResults);
#endif
#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
WINOLEAPI_(WINBOOL) CoIsHandlerConnected (LPUNKNOWN pUnk);
#if _WIN32_WINNT >= 0x0600
WINOLEAPI CoDisconnectContext (DWORD dwTimeout);
#endif
WINOLEAPI CoGetCallContext (REFIID riid, void **ppInterface);
WINOLEAPI CoQueryProxyBlanket (IUnknown *pProxy, DWORD *pwAuthnSvc, DWORD *pAuthzSvc, LPOLESTR *pServerPrincName, DWORD *pAuthnLevel, DWORD *pImpLevel, RPC_AUTH_IDENTITY_HANDLE *pAuthInfo, DWORD *pCapabilites);
WINOLEAPI CoSetProxyBlanket (IUnknown *pProxy, DWORD dwAuthnSvc, DWORD dwAuthzSvc, OLECHAR *pServerPrincName, DWORD dwAuthnLevel, DWORD dwImpLevel, RPC_AUTH_IDENTITY_HANDLE pAuthInfo, DWORD dwCapabilities);
WINOLEAPI CoCopyProxy (IUnknown *pProxy, IUnknown **ppCopy);
WINOLEAPI CoQueryClientBlanket (DWORD *pAuthnSvc, DWORD *pAuthzSvc, LPOLESTR *pServerPrincName, DWORD *pAuthnLevel, DWORD *pImpLevel, RPC_AUTHZ_HANDLE *pPrivs, DWORD *pCapabilities);
WINOLEAPI CoImpersonateClient (void);
WINOLEAPI CoRevertToSelf (void);
WINOLEAPI CoQueryAuthenticationServices (DWORD *pcAuthSvc, SOLE_AUTHENTICATION_SERVICE **asAuthSvc);
WINOLEAPI CoCreateInstance (REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID riid, LPVOID *ppv);
WINOLEAPI CoCreateInstanceEx (REFCLSID Clsid, IUnknown *punkOuter, DWORD dwClsCtx, COSERVERINFO *pServerInfo, DWORD dwCount, MULTI_QI *pResults);
#endif
#if WINAPI_FAMILY == WINAPI_FAMILY_APP
__forceinline HRESULT CoCreateInstance (REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID riid, LPVOID *ppv) {
MULTI_QI OneQI;
HRESULT hr;
OneQI.pItf = NULL;
#ifdef __cplusplus
OneQI.pIID = &riid;
#else
OneQI.pIID = riid;
#endif
hr = CoCreateInstanceFromApp (rclsid, pUnkOuter, dwClsContext, NULL, 1,&OneQI);
*ppv = OneQI.pItf;
return FAILED (hr) ? hr : OneQI.hr;
}
__forceinline HRESULT CoCreateInstanceEx (REFCLSID Clsid, IUnknown *punkOuter, DWORD dwClsCtx, COSERVERINFO *pServerInfo, DWORD dwCount, MULTI_QI *pResults) {
return CoCreateInstanceFromApp (Clsid, punkOuter, dwClsCtx, pServerInfo, dwCount, pResults);
}
#endif
#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
WINOLEAPI CoGetCancelObject (DWORD dwThreadId, REFIID iid, void **ppUnk);
WINOLEAPI CoSetCancelObject (IUnknown *pUnk);
WINOLEAPI CoCancelCall (DWORD dwThreadId, ULONG ulTimeout);
WINOLEAPI CoTestCancel (void);
WINOLEAPI CoEnableCallCancellation (LPVOID pReserved);
WINOLEAPI CoDisableCallCancellation (LPVOID pReserved);
#endif
#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_APP)
WINOLEAPI StringFromCLSID (REFCLSID rclsid, LPOLESTR *lplpsz);
WINOLEAPI CLSIDFromString (LPCOLESTR lpsz, LPCLSID pclsid);
WINOLEAPI StringFromIID (REFIID rclsid, LPOLESTR *lplpsz);
WINOLEAPI IIDFromString (LPCOLESTR lpsz, LPIID lpiid);
#endif
#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
WINOLEAPI ProgIDFromCLSID (REFCLSID clsid, LPOLESTR *lplpszProgID);
WINOLEAPI CLSIDFromProgID (LPCOLESTR lpszProgID, LPCLSID lpclsid);
#endif
#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_APP)
WINOLEAPI_(int) StringFromGUID2 (REFGUID rguid, LPOLESTR lpsz, int cchMax);
WINOLEAPI CoCreateGuid (GUID *pguid);
typedef struct tagPROPVARIANT PROPVARIANT;
WINOLEAPI PropVariantCopy (PROPVARIANT *pvarDest, const PROPVARIANT *pvarSrc);
WINOLEAPI PropVariantClear (PROPVARIANT *pvar);
WINOLEAPI FreePropVariantArray (ULONG cVariants, PROPVARIANT *rgvars);
#endif
#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
WINOLEAPI CoWaitForMultipleHandles (DWORD dwFlags, DWORD dwTimeout, ULONG cHandles, LPHANDLE pHandles, LPDWORD lpdwindex);
#endif
#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_APP)
typedef enum tagCOWAIT_FLAGS {
COWAIT_DEFAULT = 0,
COWAIT_WAITALL = 1,
COWAIT_ALERTABLE = 2,
COWAIT_INPUTAVAILABLE = 4
#endif
#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
, COWAIT_DISPATCH_CALLS = 8,
COWAIT_DISPATCH_WINDOW_MESSAGES = 0x10
#endif
#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_APP)
} COWAIT_FLAGS;
#endif
#if NTDDI_VERSION >= 0x06020000
#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_APP)
typedef enum CWMO_FLAGS {
CWMO_DEFAULT = 0,
CWMO_DISPATCH_CALLS = 1
#endif
#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
, CWMO_DISPATCH_WINDOW_MESSAGES = 2
#endif
#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_APP)
} CWMO_FLAGS;
#endif
#endif
#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_APP)
#define CWMO_MAX_HANDLES 56
#endif
#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
WINOLEAPI CoGetTreatAsClass (REFCLSID clsidOld, LPCLSID pClsidNew);
WINOLEAPI CoInvalidateRemoteMachineBindings (LPOLESTR pszMachineName);
#endif
#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_APP)
typedef HRESULT (STDAPICALLTYPE *LPFNGETCLASSOBJECT) (REFCLSID, REFIID, LPVOID *);
typedef HRESULT (STDAPICALLTYPE *LPFNCANUNLOADNOW) (void);
STDAPI DllGetClassObject (REFCLSID rclsid, REFIID riid, LPVOID *ppv);
STDAPI DllCanUnloadNow (void);
WINOLEAPI_ (LPVOID) CoTaskMemAlloc (SIZE_T cb);
WINOLEAPI_ (LPVOID) CoTaskMemRealloc (LPVOID pv, SIZE_T cb);
WINOLEAPI_ (void) CoTaskMemFree (LPVOID pv);
#ifndef RC_INVOKED
#include <poppack.h>
#endif
#endif
#endif
|