Backed out 15 changesets (bug 1852806) for causing mda failures on test_video_low_pow...
[gecko.git] / ipc / mscom / COMWrappers.h
blob38bef10749fd368edba627a863f53af3c8338a68
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_mscom_COMWrappers_h
8 #define mozilla_mscom_COMWrappers_h
10 #include <objbase.h>
12 #if (NTDDI_VERSION < NTDDI_WIN8)
13 // Win8+ API that we use very carefully
14 DECLARE_HANDLE(CO_MTA_USAGE_COOKIE);
15 HRESULT WINAPI CoIncrementMTAUsage(CO_MTA_USAGE_COOKIE* pCookie);
16 #endif // (NTDDI_VERSION < NTDDI_WIN8)
18 // A set of wrapped COM functions, so that we can dynamically link to the
19 // functions in combase.dll on win8+. This prevents ole32.dll and many other
20 // DLLs loading, which are not required when we have win32k locked down.
21 namespace mozilla::mscom::wrapped {
23 HRESULT CoInitializeEx(LPVOID pvReserved, DWORD dwCoInit);
25 void CoUninitialize();
27 HRESULT CoIncrementMTAUsage(CO_MTA_USAGE_COOKIE* pCookie);
29 HRESULT CoGetApartmentType(APTTYPE* pAptType, APTTYPEQUALIFIER* pAptQualifier);
31 HRESULT CoInitializeSecurity(PSECURITY_DESCRIPTOR pSecDesc, LONG cAuthSvc,
32 SOLE_AUTHENTICATION_SERVICE* asAuthSvc,
33 void* pReserved1, DWORD dwAuthnLevel,
34 DWORD dwImpLevel, void* pAuthList,
35 DWORD dwCapabilities, void* pReserved3);
37 HRESULT CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter,
38 DWORD dwClsContext, REFIID riid, LPVOID* ppv);
40 HRESULT CoCreateGuid(GUID* pguid);
42 } // namespace mozilla::mscom::wrapped
44 #endif // mozilla_mscom_COMWrappers_h