2004-07-06 23:01:18 +02:00
|
|
|
/*
|
|
|
|
* Implementation of the Active Template Library (atl.dll)
|
|
|
|
*
|
|
|
|
* Copyright 2004 Aric Stewart for CodeWeavers
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2004-07-06 23:01:18 +02:00
|
|
|
*/
|
|
|
|
|
2005-06-22 14:00:12 +02:00
|
|
|
#ifndef __WINE_ATLBASE_H__
|
|
|
|
#define __WINE_ATLBASE_H__
|
|
|
|
|
2012-11-21 11:10:28 +01:00
|
|
|
#include <atliface.h>
|
2012-12-24 15:13:39 +01:00
|
|
|
#include <comcat.h>
|
2005-06-22 14:00:12 +02:00
|
|
|
|
2012-12-11 22:16:38 +01:00
|
|
|
/* Wine extension: we (ab)use _ATL_VER to handle struct layout differences between ATL versions. */
|
2012-12-10 12:27:03 +01:00
|
|
|
#define _ATL_VER_30 0x0300
|
|
|
|
#define _ATL_VER_70 0x0700
|
|
|
|
#define _ATL_VER_80 0x0800
|
2013-10-12 06:11:58 +02:00
|
|
|
#define _ATL_VER_90 0x0900
|
2012-12-10 12:27:03 +01:00
|
|
|
#define _ATL_VER_100 0x0a00
|
2013-09-03 11:37:21 +02:00
|
|
|
#define _ATL_VER_110 0x0b00
|
2012-12-10 12:27:03 +01:00
|
|
|
|
|
|
|
#ifndef _ATL_VER
|
|
|
|
#define _ATL_VER _ATL_VER_100
|
|
|
|
#endif
|
|
|
|
|
2004-07-06 23:01:18 +02:00
|
|
|
typedef HRESULT (WINAPI _ATL_CREATORFUNC)(void* pv, REFIID riid, LPVOID* ppv);
|
|
|
|
typedef HRESULT (WINAPI _ATL_CREATORARGFUNC)(void* pv, REFIID riid, LPVOID* ppv, DWORD dw);
|
|
|
|
typedef HRESULT (WINAPI _ATL_MODULEFUNC)(DWORD dw);
|
2009-10-03 10:01:03 +02:00
|
|
|
typedef LPCSTR (WINAPI _ATL_DESCRIPTIONFUNCA)(void);
|
|
|
|
typedef LPCWSTR (WINAPI _ATL_DESCRIPTIONFUNCW)(void);
|
|
|
|
typedef const struct _ATL_CATMAP_ENTRY* (_ATL_CATMAPFUNC)(void);
|
2004-07-06 23:01:18 +02:00
|
|
|
typedef void (WINAPI _ATL_TERMFUNC)(DWORD dw);
|
|
|
|
|
2012-12-10 12:27:03 +01:00
|
|
|
typedef CRITICAL_SECTION CComCriticalSection;
|
|
|
|
|
2010-02-02 20:13:56 +01:00
|
|
|
typedef struct _ATL_OBJMAP_ENTRYA_V1_TAG
|
|
|
|
{
|
|
|
|
const CLSID* pclsid;
|
|
|
|
HRESULT (WINAPI *pfnUpdateRegistry)(BOOL bRegister);
|
|
|
|
_ATL_CREATORFUNC* pfnGetClassObject;
|
|
|
|
_ATL_CREATORFUNC* pfnCreateInstance;
|
|
|
|
IUnknown* pCF;
|
|
|
|
DWORD dwRegister;
|
|
|
|
_ATL_DESCRIPTIONFUNCA* pfnGetObjectDescription;
|
|
|
|
}_ATL_OBJMAP_ENTRYA_V1;
|
|
|
|
|
|
|
|
typedef struct _ATL_OBJMAP_ENTRYW_V1_TAG
|
|
|
|
{
|
|
|
|
const CLSID* pclsid;
|
|
|
|
HRESULT (WINAPI *pfnUpdateRegistry)(BOOL bRegister);
|
|
|
|
_ATL_CREATORFUNC* pfnGetClassObject;
|
|
|
|
_ATL_CREATORFUNC* pfnCreateInstance;
|
|
|
|
IUnknown* pCF;
|
|
|
|
DWORD dwRegister;
|
|
|
|
_ATL_DESCRIPTIONFUNCW* pfnGetObjectDescription;
|
|
|
|
} _ATL_OBJMAP_ENTRYW_V1;
|
|
|
|
|
2004-07-06 23:01:18 +02:00
|
|
|
typedef struct _ATL_OBJMAP_ENTRYA_TAG
|
|
|
|
{
|
|
|
|
const CLSID* pclsid;
|
|
|
|
HRESULT (WINAPI *pfnUpdateRegistry)(BOOL bRegister);
|
|
|
|
_ATL_CREATORFUNC* pfnGetClassObject;
|
|
|
|
_ATL_CREATORFUNC* pfnCreateInstance;
|
|
|
|
IUnknown* pCF;
|
|
|
|
DWORD dwRegister;
|
|
|
|
_ATL_DESCRIPTIONFUNCA* pfnGetObjectDescription;
|
|
|
|
_ATL_CATMAPFUNC* pfnGetCategoryMap;
|
|
|
|
void (WINAPI *pfnObjectMain)(BOOL bStarting);
|
|
|
|
}_ATL_OBJMAP_ENTRYA;
|
|
|
|
|
|
|
|
typedef struct _ATL_OBJMAP_ENTRYW_TAG
|
|
|
|
{
|
|
|
|
const CLSID* pclsid;
|
|
|
|
HRESULT (WINAPI *pfnUpdateRegistry)(BOOL bRegister);
|
|
|
|
_ATL_CREATORFUNC* pfnGetClassObject;
|
|
|
|
_ATL_CREATORFUNC* pfnCreateInstance;
|
|
|
|
IUnknown* pCF;
|
|
|
|
DWORD dwRegister;
|
|
|
|
_ATL_DESCRIPTIONFUNCW* pfnGetObjectDescription;
|
|
|
|
_ATL_CATMAPFUNC* pfnGetCategoryMap;
|
|
|
|
void (WINAPI *pfnObjectMain)(BOOL bStarting);
|
2012-12-14 11:58:10 +01:00
|
|
|
} _ATL_OBJMAP_ENTRYW, _ATL_OBJMAP_ENTRY30, _ATL_OBJMAP_ENTRY;
|
2004-07-06 23:01:18 +02:00
|
|
|
|
2017-10-06 18:51:36 +02:00
|
|
|
typedef struct _ATL_OBJMAP_CACHE
|
|
|
|
{
|
|
|
|
IUnknown *pCF;
|
|
|
|
DWORD dwRegister;
|
|
|
|
} _ATL_OBJMAP_CACHE;
|
|
|
|
|
|
|
|
typedef struct _ATL_OBJMAP_ENTRY110
|
|
|
|
{
|
|
|
|
const CLSID* pclsid;
|
|
|
|
HRESULT (WINAPI *pfnUpdateRegistry)(BOOL bRegister);
|
|
|
|
_ATL_CREATORFUNC* pfnGetClassObject;
|
|
|
|
_ATL_CREATORFUNC* pfnCreateInstance;
|
|
|
|
_ATL_OBJMAP_CACHE* pCache;
|
|
|
|
_ATL_DESCRIPTIONFUNCW* pfnGetObjectDescription;
|
|
|
|
_ATL_CATMAPFUNC* pfnGetCategoryMap;
|
|
|
|
void (WINAPI *pfnObjectMain)(BOOL bStarting);
|
|
|
|
} _ATL_OBJMAP_ENTRY110, _ATL_OBJMAP_ENTRY_EX;
|
2004-07-06 23:01:18 +02:00
|
|
|
|
|
|
|
typedef struct _ATL_TERMFUNC_ELEM_TAG
|
|
|
|
{
|
|
|
|
_ATL_TERMFUNC* pFunc;
|
2005-10-18 12:34:21 +02:00
|
|
|
DWORD_PTR dw;
|
2004-07-06 23:01:18 +02:00
|
|
|
struct _ATL_TERMFUNC_ELEM_TAG* pNext;
|
|
|
|
} _ATL_TERMFUNC_ELEM;
|
|
|
|
|
|
|
|
typedef struct _AtlCreateWndData_TAG
|
|
|
|
{
|
|
|
|
void* m_pThis;
|
|
|
|
DWORD m_dwThreadID;
|
|
|
|
struct _AtlCreateWndData_TAG* m_pNext;
|
|
|
|
} _AtlCreateWndData;
|
|
|
|
|
|
|
|
typedef struct _ATL_MODULEA_TAG
|
|
|
|
{
|
|
|
|
UINT cbSize;
|
|
|
|
HINSTANCE m_hInst;
|
|
|
|
HINSTANCE m_hInstResource;
|
|
|
|
HINSTANCE m_hInstTypeLib;
|
|
|
|
_ATL_OBJMAP_ENTRYA* m_pObjMap;
|
|
|
|
LONG m_nLockCnt;
|
|
|
|
HANDLE m_hHeap;
|
|
|
|
union
|
|
|
|
{
|
|
|
|
CRITICAL_SECTION m_csTypeInfoHolder;
|
|
|
|
CRITICAL_SECTION m_csStaticDataInit;
|
|
|
|
} u;
|
|
|
|
CRITICAL_SECTION m_csWindowCreate;
|
|
|
|
CRITICAL_SECTION m_csObjMap;
|
|
|
|
|
|
|
|
DWORD dwAtlBuildVer;
|
|
|
|
_AtlCreateWndData* m_pCreateWndList;
|
|
|
|
BOOL m_bDestroyHeap;
|
|
|
|
GUID* pguidVer;
|
|
|
|
DWORD m_dwHeaps;
|
|
|
|
HANDLE* m_phHeaps;
|
|
|
|
int m_nHeap;
|
|
|
|
_ATL_TERMFUNC_ELEM* m_pTermFuncs;
|
|
|
|
} _ATL_MODULEA;
|
|
|
|
|
|
|
|
typedef struct _ATL_MODULEW_TAG
|
|
|
|
{
|
|
|
|
UINT cbSize;
|
|
|
|
HINSTANCE m_hInst;
|
|
|
|
HINSTANCE m_hInstResource;
|
|
|
|
HINSTANCE m_hInstTypeLib;
|
|
|
|
_ATL_OBJMAP_ENTRYW* m_pObjMap;
|
|
|
|
LONG m_nLockCnt;
|
|
|
|
HANDLE m_hHeap;
|
|
|
|
union
|
|
|
|
{
|
|
|
|
CRITICAL_SECTION m_csTypeInfoHolder;
|
|
|
|
CRITICAL_SECTION m_csStaticDataInit;
|
|
|
|
} u;
|
|
|
|
CRITICAL_SECTION m_csWindowCreate;
|
|
|
|
CRITICAL_SECTION m_csObjMap;
|
|
|
|
|
|
|
|
DWORD dwAtlBuildVer;
|
|
|
|
_AtlCreateWndData* m_pCreateWndList;
|
|
|
|
BOOL m_bDestroyHeap;
|
|
|
|
GUID* pguidVer;
|
|
|
|
DWORD m_dwHeaps;
|
|
|
|
HANDLE* m_phHeaps;
|
|
|
|
int m_nHeap;
|
|
|
|
_ATL_TERMFUNC_ELEM* m_pTermFuncs;
|
|
|
|
} _ATL_MODULEW;
|
|
|
|
|
2012-12-12 14:56:11 +01:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
void *m_aT;
|
|
|
|
int m_nSize;
|
|
|
|
int m_nAllocSize;
|
|
|
|
} CSimpleArray;
|
|
|
|
|
2012-12-10 12:27:03 +01:00
|
|
|
typedef struct _ATL_MODULE70
|
|
|
|
{
|
|
|
|
UINT cbSize;
|
|
|
|
LONG m_nLockCnt;
|
|
|
|
_ATL_TERMFUNC_ELEM *m_pTermFuncs;
|
|
|
|
CComCriticalSection m_csStaticDataInitAndTypeInfo;
|
|
|
|
} _ATL_MODULE70;
|
|
|
|
|
2012-12-12 14:56:11 +01:00
|
|
|
typedef struct _ATL_WIN_MODULE70
|
|
|
|
{
|
|
|
|
UINT cbSize;
|
|
|
|
CComCriticalSection m_csWindowCreate;
|
|
|
|
_AtlCreateWndData *m_pCreateWndList;
|
|
|
|
CSimpleArray /* <ATOM> */ m_rgWindowClassAtoms;
|
|
|
|
} _ATL_WIN_MODULE70;
|
|
|
|
|
2017-10-06 18:51:36 +02:00
|
|
|
#if _ATL_VER >= _ATL_VER_110
|
|
|
|
typedef struct _ATL_COM_MODULE70
|
|
|
|
{
|
|
|
|
UINT cbSize;
|
|
|
|
HINSTANCE m_hInstTypeLib;
|
|
|
|
_ATL_OBJMAP_ENTRY_EX **m_ppAutoObjMapFirst;
|
|
|
|
_ATL_OBJMAP_ENTRY_EX **m_ppAutoObjMapLast;
|
|
|
|
CComCriticalSection m_csObjMap;
|
|
|
|
} _ATL_COM_MODULE70, _ATL_COM_MODULE;
|
|
|
|
#else
|
2012-12-14 11:58:10 +01:00
|
|
|
typedef struct _ATL_COM_MODULE70
|
|
|
|
{
|
|
|
|
UINT cbSize;
|
|
|
|
HINSTANCE m_hInstTypeLib;
|
|
|
|
_ATL_OBJMAP_ENTRY **m_ppAutoObjMapFirst;
|
|
|
|
_ATL_OBJMAP_ENTRY **m_ppAutoObjMapLast;
|
|
|
|
CComCriticalSection m_csObjMap;
|
|
|
|
} _ATL_COM_MODULE70, _ATL_COM_MODULE;
|
2017-10-06 18:51:36 +02:00
|
|
|
#endif
|
2012-12-14 11:58:10 +01:00
|
|
|
|
2012-12-10 12:27:03 +01:00
|
|
|
#if _ATL_VER >= _ATL_VER_70
|
|
|
|
typedef _ATL_MODULE70 _ATL_MODULE;
|
2012-12-12 14:56:11 +01:00
|
|
|
typedef _ATL_WIN_MODULE70 _ATL_WIN_MODULE;
|
2012-12-10 12:27:03 +01:00
|
|
|
#else
|
|
|
|
typedef _ATL_MODULEW _ATL_MODULE;
|
2012-12-12 14:56:11 +01:00
|
|
|
typedef _ATL_MODULEW _ATL_WIN_MODULE;
|
2012-12-10 12:27:03 +01:00
|
|
|
#endif
|
|
|
|
|
2004-07-06 23:01:18 +02:00
|
|
|
typedef struct _ATL_INTMAP_ENTRY_TAG
|
|
|
|
{
|
|
|
|
const IID* piid;
|
|
|
|
DWORD dw;
|
|
|
|
_ATL_CREATORARGFUNC* pFunc;
|
|
|
|
} _ATL_INTMAP_ENTRY;
|
|
|
|
|
2005-04-22 21:04:18 +02:00
|
|
|
struct _ATL_REGMAP_ENTRY
|
|
|
|
{
|
|
|
|
LPCOLESTR szKey;
|
|
|
|
LPCOLESTR szData;
|
|
|
|
};
|
|
|
|
|
2012-12-24 15:13:39 +01:00
|
|
|
struct _ATL_CATMAP_ENTRY
|
|
|
|
{
|
|
|
|
int iType;
|
|
|
|
const CATID *pcatid;
|
|
|
|
};
|
|
|
|
|
|
|
|
#define _ATL_CATMAP_ENTRY_END 0
|
|
|
|
#define _ATL_CATMAP_ENTRY_IMPLEMENTED 1
|
|
|
|
#define _ATL_CATMAP_ENTRY_REQUIRED 2
|
|
|
|
|
2005-06-22 14:00:12 +02:00
|
|
|
HRESULT WINAPI AtlAdvise(IUnknown *pUnkCP, IUnknown *pUnk, const IID * iid, LPDWORD dpw);
|
2006-10-30 19:20:26 +01:00
|
|
|
HRESULT WINAPI AtlAxAttachControl(IUnknown*,HWND,IUnknown**);
|
2005-11-28 11:28:19 +01:00
|
|
|
HRESULT WINAPI AtlAxCreateControl(LPCOLESTR,HWND,IStream*,IUnknown**);
|
2006-10-30 19:20:26 +01:00
|
|
|
HRESULT WINAPI AtlAxCreateControlEx(LPCOLESTR,HWND,IStream*,IUnknown**,IUnknown**,REFIID,IUnknown*);
|
2005-06-22 14:00:12 +02:00
|
|
|
HRESULT WINAPI AtlFreeMarshalStream(IStream *pStream);
|
2007-02-07 16:22:55 +01:00
|
|
|
HRESULT WINAPI AtlInternalQueryInterface(void* pThis, const _ATL_INTMAP_ENTRY* pEntries, REFIID iid, void** ppvObject);
|
2005-06-22 14:00:12 +02:00
|
|
|
HRESULT WINAPI AtlMarshalPtrInProc(IUnknown *pUnk, const IID *iid, IStream **ppStream);
|
2007-02-07 16:22:55 +01:00
|
|
|
void WINAPI AtlModuleAddCreateWndData(_ATL_MODULEW *pM, _AtlCreateWndData *pData, void* pvObject);
|
2012-12-18 11:48:37 +01:00
|
|
|
HRESULT WINAPI AtlWinModuleInit(_ATL_WIN_MODULE*);
|
2012-12-12 14:56:11 +01:00
|
|
|
void WINAPI AtlWinModuleAddCreateWndData(_ATL_WIN_MODULE*,_AtlCreateWndData*,void*);
|
2012-12-19 14:16:57 +01:00
|
|
|
void* WINAPI AtlWinModuleExtractCreateWndData(_ATL_WIN_MODULE*);
|
2012-12-10 12:27:29 +01:00
|
|
|
HRESULT WINAPI AtlModuleAddTermFunc(_ATL_MODULE *pM, _ATL_TERMFUNC *pFunc, DWORD_PTR dw);
|
2012-12-10 12:27:47 +01:00
|
|
|
void WINAPI AtlCallTermFunc(_ATL_MODULE*);
|
2007-02-07 16:22:55 +01:00
|
|
|
void* WINAPI AtlModuleExtractCreateWndData(_ATL_MODULEW *pM);
|
2006-11-10 22:06:10 +01:00
|
|
|
HRESULT WINAPI AtlModuleInit(_ATL_MODULEW* pM, _ATL_OBJMAP_ENTRYW* p, HINSTANCE h);
|
2007-02-07 16:22:55 +01:00
|
|
|
HRESULT WINAPI AtlModuleLoadTypeLib(_ATL_MODULEW *pM, LPCOLESTR lpszIndex, BSTR *pbstrPath, ITypeLib **ppTypeLib);
|
2006-11-10 22:06:10 +01:00
|
|
|
HRESULT WINAPI AtlModuleRegisterClassObjects(_ATL_MODULEW* pM, DWORD dwClsContext, DWORD dwFlags);
|
2005-06-22 14:00:12 +02:00
|
|
|
HRESULT WINAPI AtlModuleRegisterServer(_ATL_MODULEW* pM, BOOL bRegTypeLib, const CLSID* pCLSID);
|
2006-11-10 22:07:29 +01:00
|
|
|
HRESULT WINAPI AtlModuleRegisterTypeLib(_ATL_MODULEW *pM, LPCOLESTR lpszIndex);
|
2005-06-22 14:00:12 +02:00
|
|
|
HRESULT WINAPI AtlModuleUnregisterServer(_ATL_MODULEW* pM, const CLSID* pCLSID);
|
|
|
|
HRESULT WINAPI AtlModuleUpdateRegistryFromResourceD(_ATL_MODULEW *pM, LPCOLESTR lpszRes, BOOL bRegister, struct _ATL_REGMAP_ENTRY *pMapEntries, IRegistrar *pReg );
|
2006-11-10 22:06:10 +01:00
|
|
|
HRESULT WINAPI AtlModuleUnregisterServerEx(_ATL_MODULEW* pM, BOOL bUnRegTypeLib, const CLSID* pCLSID);
|
|
|
|
HRESULT WINAPI AtlModuleTerm(_ATL_MODULEW* pM);
|
2005-06-22 14:00:12 +02:00
|
|
|
HRESULT WINAPI AtlUnadvise(IUnknown *pUnkCP, const IID * iid, DWORD dw);
|
|
|
|
HRESULT WINAPI AtlUnmarshalPtr(IStream *pStream, const IID *iid, IUnknown **ppUnk);
|
2012-11-21 11:10:54 +01:00
|
|
|
HRESULT WINAPI AtlCreateRegistrar(IRegistrar**);
|
2012-12-11 13:02:14 +01:00
|
|
|
HRESULT WINAPI AtlUpdateRegistryFromResourceD(HINSTANCE,LPCOLESTR,BOOL,struct _ATL_REGMAP_ENTRY*,IRegistrar*);
|
2012-12-11 13:02:46 +01:00
|
|
|
HRESULT WINAPI AtlLoadTypeLib(HINSTANCE,LPCOLESTR,BSTR*,ITypeLib**);
|
2012-12-28 14:23:27 +01:00
|
|
|
HRESULT WINAPI AtlRegisterTypeLib(HINSTANCE,LPCOLESTR);
|
2012-12-13 12:00:23 +01:00
|
|
|
HRESULT WINAPI AtlRegisterClassCategoriesHelper(REFCLSID,const struct _ATL_CATMAP_ENTRY*,BOOL);
|
2012-12-14 11:58:10 +01:00
|
|
|
HRESULT WINAPI AtlComModuleGetClassObject(_ATL_COM_MODULE*,REFCLSID,REFIID,void**);
|
2013-02-08 10:59:19 +01:00
|
|
|
HRESULT WINAPI AtlComModuleRegisterClassObjects(_ATL_COM_MODULE*,DWORD,DWORD);
|
2019-09-24 17:56:26 +02:00
|
|
|
HRESULT WINAPI AtlComModuleRevokeClassObjects(_ATL_COM_MODULE*);
|
2013-01-14 13:03:13 +01:00
|
|
|
HRESULT WINAPI AtlComModuleUnregisterServer(_ATL_COM_MODULE*,BOOL,const CLSID*);
|
2013-01-10 13:27:05 +01:00
|
|
|
BOOL WINAPI AtlWaitWithMessageLoop(HANDLE);
|
2013-01-15 12:45:47 +01:00
|
|
|
HRESULT WINAPI AtlGetObjectSourceInterface(IUnknown*,GUID*,IID*,unsigned short*,unsigned short*);
|
2013-03-13 17:36:14 +01:00
|
|
|
HRESULT WINAPI AtlSetPerUserRegistration(unsigned char /*bool*/);
|
2013-01-25 13:12:02 +01:00
|
|
|
HRESULT WINAPI AtlGetPerUserRegistration(unsigned char /*bool*/ *);
|
2005-06-22 14:00:12 +02:00
|
|
|
|
|
|
|
#endif /* __WINE_ATLBASE_H__ */
|