diff options
Diffstat (limited to 'src/vm/olecontexthelpers.h')
-rw-r--r-- | src/vm/olecontexthelpers.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/vm/olecontexthelpers.h b/src/vm/olecontexthelpers.h new file mode 100644 index 0000000000..3066ea3ac3 --- /dev/null +++ b/src/vm/olecontexthelpers.h @@ -0,0 +1,29 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. +// OleContextHelpers.h +// + +// +// Helper APIs for interacting with Ole32 contexts & apartments. + +#ifndef _H_OLECONTEXTHELPERS +#define _H_OLECONTEXTHELPERS + +#ifndef FEATURE_COMINTEROP_APARTMENT_SUPPORT +#error FEATURE_COMINTEROP_APARTMENT_SUPPORT +#endif // FEATURE_COMINTEROP_APARTMENT_SUPPORT + +#include "contxt.h" +#include "mtx.h" +#include "ctxtcall.h" + +//================================================================ +// OLE32 Context helpers. +LPVOID GetCurrentCtxCookie(); +HRESULT GetCurrentObjCtx(IUnknown** ppObjCtx); +LPVOID SetupOleContext(); +HRESULT GetCurrentThreadTypeNT5(THDTYPE* pType); +HRESULT GetCurrentApartmentTypeNT5(IObjectContext *pObjCurrCtx, APTTYPE* pType); + +#endif // _H_OLECONTEXTHELPERS |