COMWrappers.h (1538B)
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/. */ 6 7 #ifndef mozilla_mscom_COMWrappers_h 8 #define mozilla_mscom_COMWrappers_h 9 10 #include <objbase.h> 11 12 // A set of wrapped COM functions, so that we can dynamically link to the 13 // functions in combase.dll on win8+. This prevents ole32.dll and many other 14 // DLLs loading, which are not required when we have win32k locked down. 15 namespace mozilla::mscom::wrapped { 16 17 HRESULT CoInitializeEx(LPVOID pvReserved, DWORD dwCoInit); 18 19 void CoUninitialize(); 20 21 HRESULT CoIncrementMTAUsage(CO_MTA_USAGE_COOKIE* pCookie); 22 23 HRESULT CoGetApartmentType(APTTYPE* pAptType, APTTYPEQUALIFIER* pAptQualifier); 24 25 HRESULT CoInitializeSecurity(PSECURITY_DESCRIPTOR pSecDesc, LONG cAuthSvc, 26 SOLE_AUTHENTICATION_SERVICE* asAuthSvc, 27 void* pReserved1, DWORD dwAuthnLevel, 28 DWORD dwImpLevel, void* pAuthList, 29 DWORD dwCapabilities, void* pReserved3); 30 31 HRESULT CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, 32 DWORD dwClsContext, REFIID riid, LPVOID* ppv); 33 34 HRESULT CoCreateGuid(GUID* pguid); 35 36 void CoTaskMemFree(LPVOID pv); 37 38 } // namespace mozilla::mscom::wrapped 39 40 #endif // mozilla_mscom_COMWrappers_h