#pragma once
#include <Windows.h>

/* C */
typedef HRESULT(STDMETHODCALLTYPE *COCREATEINSTANCE)(_In_  REFCLSID  rclsid, _In_  LPUNKNOWN pUnkOuter, _In_  DWORD     dwClsContext, _In_  REFIID    riid, _Out_ LPVOID *ppv);
typedef HRESULT(STDMETHODCALLTYPE *COINITIALIZEEX)(_In_opt_ LPVOID pvReserved, _In_     DWORD  dwCoInit);
typedef HRESULT(STDMETHODCALLTYPE *COINITIALIZESECURITY)(_In_opt_ PSECURITY_DESCRIPTOR pSecDesc, _In_ LONG cAuthSvc, _In_opt_ SOLE_AUTHENTICATION_SERVICE *asAuthSvc, _In_opt_ void* pReserved1, _In_ DWORD   dwAuthnLevel, _In_ DWORD   dwImpLevel, _In_opt_ void*pAuthList, _In_ DWORD   dwCapabilities, _In_opt_ void*pReserved3);
typedef HRESULT(STDMETHODCALLTYPE *COSETPROXYBLANKET)(_In_ IUnknown *pProxy, _In_ DWORD dwAuthnSvc, _In_ DWORD dwAuthzSvc, _In_opt_ OLECHAR  *pServerPrincName, _In_ DWORD dwAuthnLevel, _In_ DWORD dwImpLevel, _In_opt_ RPC_AUTH_IDENTITY_HANDLE pAuthInfo, _In_ DWORD dwCapabilities);
typedef void(STDMETHODCALLTYPE *COUNINITIALIZE)(void);


typedef struct _VTABLE_OLE32
{
	/* C */
	COCREATEINSTANCE fpCoCreateInstance;
	COINITIALIZEEX fpCoInitializeEx;
	COINITIALIZESECURITY fpCoInitializeSecurity;
	COSETPROXYBLANKET fpCoSetProxyBlanket;
	COUNINITIALIZE fpCoUninitialize;

} VTABLE_OLE32, *PVTABLE_OLE32;