ReactOS 0.4.16-dev-91-g764881a
atlbase.h
Go to the documentation of this file.
1/*
2 * Implementation of the Active Template Library (atl.dll)
3 *
4 * Copyright 2004 Aric Stewart for CodeWeavers
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21#ifndef __WINE_ATLBASE_H__
22#define __WINE_ATLBASE_H__
23
24#include <atliface.h>
25#include <comcat.h>
26
27/* Wine extension: we (ab)use _ATL_VER to handle struct layout differences between ATL versions. */
28#define _ATL_VER_30 0x0300
29#define _ATL_VER_70 0x0700
30#define _ATL_VER_80 0x0800
31#define _ATL_VER_90 0x0900
32#define _ATL_VER_100 0x0a00
33#define _ATL_VER_110 0x0b00
34
35#ifndef _ATL_VER
36#define _ATL_VER _ATL_VER_100
37#endif
38
39typedef HRESULT (WINAPI _ATL_CREATORFUNC)(void* pv, REFIID riid, LPVOID* ppv);
40typedef HRESULT (WINAPI _ATL_CREATORARGFUNC)(void* pv, REFIID riid, LPVOID* ppv, DWORD_PTR dw);
41typedef HRESULT (WINAPI _ATL_MODULEFUNC)(DWORD_PTR dw);
42typedef LPCSTR (WINAPI _ATL_DESCRIPTIONFUNCA)(void);
43typedef LPCWSTR (WINAPI _ATL_DESCRIPTIONFUNCW)(void);
44typedef const struct _ATL_CATMAP_ENTRY* (_ATL_CATMAPFUNC)(void);
45typedef void (WINAPI _ATL_TERMFUNC)(DWORD_PTR dw);
46
48
50{
51 const CLSID* pclsid;
52 HRESULT (WINAPI *pfnUpdateRegistry)(BOOL bRegister);
53 _ATL_CREATORFUNC* pfnGetClassObject;
54 _ATL_CREATORFUNC* pfnCreateInstance;
57 _ATL_DESCRIPTIONFUNCA* pfnGetObjectDescription;
59
61{
62 const CLSID* pclsid;
63 HRESULT (WINAPI *pfnUpdateRegistry)(BOOL bRegister);
64 _ATL_CREATORFUNC* pfnGetClassObject;
65 _ATL_CREATORFUNC* pfnCreateInstance;
68 _ATL_DESCRIPTIONFUNCW* pfnGetObjectDescription;
70
72{
73 const CLSID* pclsid;
74 HRESULT (WINAPI *pfnUpdateRegistry)(BOOL bRegister);
75 _ATL_CREATORFUNC* pfnGetClassObject;
76 _ATL_CREATORFUNC* pfnCreateInstance;
79 _ATL_DESCRIPTIONFUNCA* pfnGetObjectDescription;
81 void (WINAPI *pfnObjectMain)(BOOL bStarting);
83
85{
86 const CLSID* pclsid;
87 HRESULT (WINAPI *pfnUpdateRegistry)(BOOL bRegister);
88 _ATL_CREATORFUNC* pfnGetClassObject;
89 _ATL_CREATORFUNC* pfnCreateInstance;
92 _ATL_DESCRIPTIONFUNCW* pfnGetObjectDescription;
94 void (WINAPI *pfnObjectMain)(BOOL bStarting);
96
97typedef struct _ATL_OBJMAP_CACHE
98{
102
104{
105 const CLSID* pclsid;
106 HRESULT (WINAPI *pfnUpdateRegistry)(BOOL bRegister);
107 _ATL_CREATORFUNC* pfnGetClassObject;
108 _ATL_CREATORFUNC* pfnCreateInstance;
110 _ATL_DESCRIPTIONFUNCW* pfnGetObjectDescription;
112 void (WINAPI *pfnObjectMain)(BOOL bStarting);
114
116{
117 _ATL_TERMFUNC* pFunc;
121
123{
124 void* m_pThis;
128
129typedef struct _ATL_MODULEA_TAG
130{
138 union
139 {
142 } u;
145
155
156typedef struct _ATL_MODULEW_TAG
157{
165 union
166 {
169 } u;
172
182
183typedef struct
184{
185 void *m_aT;
189
190typedef struct _ATL_MODULE70
191{
197
198typedef struct _ATL_WIN_MODULE70
199{
205
206#if _ATL_VER >= _ATL_VER_110
207typedef struct _ATL_COM_MODULE70
208{
209 UINT cbSize;
215#else
216typedef struct _ATL_COM_MODULE70
217{
224#endif
225
226#if _ATL_VER >= _ATL_VER_70
229#else
232#endif
233
235{
236 const IID* piid;
238 _ATL_CREATORARGFUNC* pFunc;
240
242{
243 LPCOLESTR szKey;
244 LPCOLESTR szData;
245};
246
248{
249 int iType;
250 const CATID *pcatid;
251};
252
253#define _ATL_CATMAP_ENTRY_END 0
254#define _ATL_CATMAP_ENTRY_IMPLEMENTED 1
255#define _ATL_CATMAP_ENTRY_REQUIRED 2
256
262HRESULT WINAPI AtlInternalQueryInterface(void* pThis, const _ATL_INTMAP_ENTRY* pEntries, REFIID iid, void** ppvObject);
263HRESULT WINAPI AtlMarshalPtrInProc(IUnknown *pUnk, const IID *iid, IStream **ppStream);
268HRESULT WINAPI AtlModuleAddTermFunc(_ATL_MODULE *pM, _ATL_TERMFUNC *pFunc, DWORD_PTR dw);
272HRESULT WINAPI AtlModuleLoadTypeLib(_ATL_MODULEW *pM, LPCOLESTR lpszIndex, BSTR *pbstrPath, ITypeLib **ppTypeLib);
274HRESULT WINAPI AtlModuleRegisterServer(_ATL_MODULEW* pM, BOOL bRegTypeLib, const CLSID* pCLSID);
275HRESULT WINAPI AtlModuleRegisterTypeLib(_ATL_MODULEW *pM, LPCOLESTR lpszIndex);
277HRESULT WINAPI AtlModuleUpdateRegistryFromResourceD(_ATL_MODULEW *pM, LPCOLESTR lpszRes, BOOL bRegister, struct _ATL_REGMAP_ENTRY *pMapEntries, IRegistrar *pReg );
278HRESULT WINAPI AtlModuleUnregisterServerEx(_ATL_MODULEW* pM, BOOL bUnRegTypeLib, const CLSID* pCLSID);
280HRESULT WINAPI AtlUnadvise(IUnknown *pUnkCP, const IID * iid, DWORD dw);
281HRESULT WINAPI AtlUnmarshalPtr(IStream *pStream, const IID *iid, IUnknown **ppUnk);
291HRESULT WINAPI AtlGetObjectSourceInterface(IUnknown*,GUID*,IID*,unsigned short*,unsigned short*);
293HRESULT WINAPI AtlGetPerUserRegistration(unsigned char /*bool*/ *);
294
295#endif /* __WINE_ATLBASE_H__ */
OLECHAR * BSTR
Definition: compat.h:2293
static void *static void *static LPDIRECTPLAY IUnknown * pUnk
Definition: dplayx.c:30
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLfloat GLfloat p
Definition: glext.h:8902
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
struct _ATL_COM_MODULE70 _ATL_COM_MODULE
HRESULT WINAPI AtlModuleAddTermFunc(_ATL_MODULE *pM, _ATL_TERMFUNC *pFunc, DWORD_PTR dw)
Definition: atl.c:297
struct _ATL_OBJMAP_ENTRYA_TAG _ATL_OBJMAP_ENTRYA
struct _ATL_OBJMAP_ENTRYW_TAG _ATL_OBJMAP_ENTRY30
struct _ATL_OBJMAP_ENTRY110 _ATL_OBJMAP_ENTRY_EX
HRESULT WINAPI AtlInternalQueryInterface(void *pThis, const _ATL_INTMAP_ENTRY *pEntries, REFIID iid, void **ppvObject)
Definition: atl.c:204
const struct _ATL_CATMAP_ENTRY *() _ATL_CATMAPFUNC(void)
Definition: atlbase.h:44
HRESULT WINAPI AtlFreeMarshalStream(IStream *pStream)
Definition: atl.c:101
HRESULT WINAPI AtlSetPerUserRegistration(unsigned char)
void *WINAPI AtlModuleExtractCreateWndData(_ATL_MODULEW *pM)
Definition: atl30.c:425
HRESULT WINAPI AtlModuleInit(_ATL_MODULEW *pM, _ATL_OBJMAP_ENTRYW *p, HINSTANCE h)
Definition: atl30.c:39
struct _ATL_TERMFUNC_ELEM_TAG _ATL_TERMFUNC_ELEM
HRESULT WINAPI AtlLoadTypeLib(HINSTANCE, LPCOLESTR, BSTR *, ITypeLib **)
Definition: atl.c:341
HRESULT WINAPI AtlComModuleRegisterClassObjects(_ATL_COM_MODULE *, DWORD, DWORD)
BOOL WINAPI AtlWaitWithMessageLoop(HANDLE)
Definition: atl.c:811
REFIID riid
Definition: atlbase.h:39
HRESULT WINAPI AtlUpdateRegistryFromResourceD(HINSTANCE, LPCOLESTR, BOOL, struct _ATL_REGMAP_ENTRY *, IRegistrar *)
Definition: registrar.c:706
HRESULT WINAPI AtlRegisterTypeLib(HINSTANCE, LPCOLESTR)
struct _ATL_OBJMAP_ENTRYW_TAG _ATL_OBJMAP_ENTRYW
HRESULT WINAPI AtlWinModuleInit(_ATL_WIN_MODULE *)
HRESULT WINAPI AtlCreateRegistrar(IRegistrar **)
Definition: registrar.c:687
HRESULT WINAPI AtlMarshalPtrInProc(IUnknown *pUnk, const IID *iid, IStream **ppStream)
Definition: atl.c:110
CRITICAL_SECTION CComCriticalSection
Definition: atlbase.h:47
HRESULT WINAPI AtlUnadvise(IUnknown *pUnkCP, const IID *iid, DWORD dw)
Definition: atl.c:73
HRESULT WINAPI AtlUnmarshalPtr(IStream *pStream, const IID *iid, IUnknown **ppUnk)
Definition: atl.c:119
void WINAPI AtlWinModuleAddCreateWndData(_ATL_WIN_MODULE *, _AtlCreateWndData *, void *)
_ATL_MODULE70 _ATL_MODULE
Definition: atlbase.h:227
HRESULT WINAPI AtlModuleUnregisterServerEx(_ATL_MODULEW *pM, BOOL bUnRegTypeLib, const CLSID *pCLSID)
Definition: atl30.c:171
struct _ATL_OBJMAP_ENTRYA_V1_TAG _ATL_OBJMAP_ENTRYA_V1
struct _ATL_OBJMAP_ENTRYW_V1_TAG _ATL_OBJMAP_ENTRYW_V1
REFIID LPVOID * ppv
Definition: atlbase.h:39
REFIID LPVOID DWORD_PTR dw
Definition: atlbase.h:40
void *WINAPI AtlWinModuleExtractCreateWndData(_ATL_WIN_MODULE *)
HRESULT WINAPI AtlGetPerUserRegistration(unsigned char *)
struct _ATL_INTMAP_ENTRY_TAG _ATL_INTMAP_ENTRY
HRESULT WINAPI AtlModuleRegisterServer(_ATL_MODULEW *pM, BOOL bRegTypeLib, const CLSID *pCLSID)
Definition: atl30.c:181
HRESULT WINAPI AtlGetObjectSourceInterface(IUnknown *, GUID *, IID *, unsigned short *, unsigned short *)
Definition: atl.c:888
HRESULT WINAPI AtlRegisterClassCategoriesHelper(REFCLSID, const struct _ATL_CATMAP_ENTRY *, BOOL)
Definition: atl.c:747
HRESULT WINAPI AtlModuleLoadTypeLib(_ATL_MODULEW *pM, LPCOLESTR lpszIndex, BSTR *pbstrPath, ITypeLib **ppTypeLib)
Definition: atl30.c:101
HRESULT WINAPI AtlAxCreateControlEx(LPCOLESTR, HWND, IStream *, IUnknown **, IUnknown **, REFIID, IUnknown *)
HRESULT WINAPI AtlModuleRegisterTypeLib(_ATL_MODULEW *pM, LPCOLESTR lpszIndex)
Definition: atl30.c:265
HRESULT WINAPI AtlComModuleUnregisterServer(_ATL_COM_MODULE *, BOOL, const CLSID *)
struct _ATL_MODULEA_TAG _ATL_MODULEA
HRESULT WINAPI AtlAdvise(IUnknown *pUnkCP, IUnknown *pUnk, const IID *iid, LPDWORD dpw)
struct _ATL_OBJMAP_ENTRYW_TAG _ATL_OBJMAP_ENTRY
void WINAPI AtlCallTermFunc(_ATL_MODULE *)
HRESULT WINAPI AtlModuleTerm(_ATL_MODULEW *pM)
HRESULT WINAPI AtlAxCreateControl(LPCOLESTR, HWND, IStream *, IUnknown **)
Definition: atl_ax.c:986
struct _ATL_MODULEW_TAG _ATL_MODULEW
HRESULT WINAPI AtlAxAttachControl(IUnknown *, HWND, IUnknown **)
Definition: atl_ax.c:1147
HRESULT WINAPI AtlModuleUnregisterServer(_ATL_MODULEW *pM, const CLSID *pCLSID)
Definition: atl30.c:287
HRESULT WINAPI AtlModuleUpdateRegistryFromResourceD(_ATL_MODULEW *pM, LPCOLESTR lpszRes, BOOL bRegister, struct _ATL_REGMAP_ENTRY *pMapEntries, IRegistrar *pReg)
Definition: atl30.c:453
struct _AtlCreateWndData_TAG _AtlCreateWndData
HRESULT WINAPI AtlComModuleGetClassObject(_ATL_COM_MODULE *, REFCLSID, REFIID, void **)
HRESULT WINAPI AtlModuleRegisterClassObjects(_ATL_MODULEW *pM, DWORD dwClsContext, DWORD dwFlags)
Definition: atl30.c:133
_ATL_WIN_MODULE70 _ATL_WIN_MODULE
Definition: atlbase.h:228
void WINAPI AtlModuleAddCreateWndData(_ATL_MODULEW *pM, _AtlCreateWndData *pData, void *pvObject)
Definition: atl30.c:405
unsigned int UINT
Definition: ndis.h:50
long LONG
Definition: pedump.c:60
#define REFIID
Definition: guiddef.h:118
#define REFCLSID
Definition: guiddef.h:117
void * m_aT
Definition: atlbase.h:185
int m_nSize
Definition: atlbase.h:186
int m_nAllocSize
Definition: atlbase.h:187
Definition: atlbase.h:248
const CATID * pcatid
Definition: atlbase.h:250
int iType
Definition: atlbase.h:249
_ATL_OBJMAP_ENTRY ** m_ppAutoObjMapFirst
Definition: atlbase.h:220
HINSTANCE m_hInstTypeLib
Definition: atlbase.h:219
_ATL_OBJMAP_ENTRY ** m_ppAutoObjMapLast
Definition: atlbase.h:221
CComCriticalSection m_csObjMap
Definition: atlbase.h:222
Definition: atlbase.h:235
_ATL_CREATORARGFUNC * pFunc
Definition: atlbase.h:238
const IID * piid
Definition: atlbase.h:236
DWORD_PTR dw
Definition: atlbase.h:237
CComCriticalSection m_csStaticDataInitAndTypeInfo
Definition: atlbase.h:195
LONG m_nLockCnt
Definition: atlbase.h:193
UINT cbSize
Definition: atlbase.h:192
_ATL_TERMFUNC_ELEM * m_pTermFuncs
Definition: atlbase.h:194
DWORD m_dwHeaps
Definition: atlbase.h:150
CRITICAL_SECTION m_csTypeInfoHolder
Definition: atlbase.h:140
HINSTANCE m_hInst
Definition: atlbase.h:132
_ATL_OBJMAP_ENTRYA * m_pObjMap
Definition: atlbase.h:135
_ATL_TERMFUNC_ELEM * m_pTermFuncs
Definition: atlbase.h:153
CRITICAL_SECTION m_csObjMap
Definition: atlbase.h:144
_AtlCreateWndData * m_pCreateWndList
Definition: atlbase.h:147
HANDLE * m_phHeaps
Definition: atlbase.h:151
HINSTANCE m_hInstResource
Definition: atlbase.h:133
CRITICAL_SECTION m_csWindowCreate
Definition: atlbase.h:143
CRITICAL_SECTION m_csStaticDataInit
Definition: atlbase.h:141
GUID * pguidVer
Definition: atlbase.h:149
HINSTANCE m_hInstTypeLib
Definition: atlbase.h:134
BOOL m_bDestroyHeap
Definition: atlbase.h:148
union _ATL_MODULEA_TAG::@3557 u
HANDLE m_hHeap
Definition: atlbase.h:137
DWORD dwAtlBuildVer
Definition: atlbase.h:146
_ATL_TERMFUNC_ELEM * m_pTermFuncs
Definition: atlbase.h:180
HINSTANCE m_hInstResource
Definition: atlbase.h:160
CRITICAL_SECTION m_csTypeInfoHolder
Definition: atlbase.h:167
CRITICAL_SECTION m_csStaticDataInit
Definition: atlbase.h:168
HINSTANCE m_hInst
Definition: atlbase.h:159
HANDLE * m_phHeaps
Definition: atlbase.h:178
BOOL m_bDestroyHeap
Definition: atlbase.h:175
CRITICAL_SECTION m_csWindowCreate
Definition: atlbase.h:170
GUID * pguidVer
Definition: atlbase.h:176
_ATL_OBJMAP_ENTRYW * m_pObjMap
Definition: atlbase.h:162
union _ATL_MODULEW_TAG::@3558 u
CRITICAL_SECTION m_csObjMap
Definition: atlbase.h:171
_AtlCreateWndData * m_pCreateWndList
Definition: atlbase.h:174
HINSTANCE m_hInstTypeLib
Definition: atlbase.h:161
HANDLE m_hHeap
Definition: atlbase.h:164
DWORD m_dwHeaps
Definition: atlbase.h:177
DWORD dwAtlBuildVer
Definition: atlbase.h:173
DWORD dwRegister
Definition: atlbase.h:100
IUnknown * pCF
Definition: atlbase.h:99
_ATL_CREATORFUNC * pfnGetClassObject
Definition: atlbase.h:107
_ATL_CREATORFUNC * pfnCreateInstance
Definition: atlbase.h:108
_ATL_CATMAPFUNC * pfnGetCategoryMap
Definition: atlbase.h:111
void(WINAPI *pfnObjectMain)(BOOL bStarting)
HRESULT(WINAPI *pfnUpdateRegistry)(BOOL bRegister)
_ATL_OBJMAP_CACHE * pCache
Definition: atlbase.h:109
_ATL_DESCRIPTIONFUNCW * pfnGetObjectDescription
Definition: atlbase.h:110
const CLSID * pclsid
Definition: atlbase.h:105
IUnknown * pCF
Definition: atlbase.h:77
HRESULT(WINAPI *pfnUpdateRegistry)(BOOL bRegister)
_ATL_DESCRIPTIONFUNCA * pfnGetObjectDescription
Definition: atlbase.h:79
_ATL_CREATORFUNC * pfnCreateInstance
Definition: atlbase.h:76
_ATL_CATMAPFUNC * pfnGetCategoryMap
Definition: atlbase.h:80
_ATL_CREATORFUNC * pfnGetClassObject
Definition: atlbase.h:75
const CLSID * pclsid
Definition: atlbase.h:73
void(WINAPI *pfnObjectMain)(BOOL bStarting)
_ATL_DESCRIPTIONFUNCA * pfnGetObjectDescription
Definition: atlbase.h:57
HRESULT(WINAPI *pfnUpdateRegistry)(BOOL bRegister)
_ATL_CREATORFUNC * pfnCreateInstance
Definition: atlbase.h:54
const CLSID * pclsid
Definition: atlbase.h:51
_ATL_CREATORFUNC * pfnGetClassObject
Definition: atlbase.h:53
_ATL_CREATORFUNC * pfnCreateInstance
Definition: atlbase.h:89
IUnknown * pCF
Definition: atlbase.h:90
HRESULT(WINAPI *pfnUpdateRegistry)(BOOL bRegister)
_ATL_DESCRIPTIONFUNCW * pfnGetObjectDescription
Definition: atlbase.h:92
void(WINAPI *pfnObjectMain)(BOOL bStarting)
_ATL_CATMAPFUNC * pfnGetCategoryMap
Definition: atlbase.h:93
const CLSID * pclsid
Definition: atlbase.h:86
_ATL_CREATORFUNC * pfnGetClassObject
Definition: atlbase.h:88
_ATL_DESCRIPTIONFUNCW * pfnGetObjectDescription
Definition: atlbase.h:68
HRESULT(WINAPI *pfnUpdateRegistry)(BOOL bRegister)
const CLSID * pclsid
Definition: atlbase.h:62
_ATL_CREATORFUNC * pfnGetClassObject
Definition: atlbase.h:64
_ATL_CREATORFUNC * pfnCreateInstance
Definition: atlbase.h:65
Definition: atlbase.h:242
LPCOLESTR szKey
Definition: atlbase.h:243
LPCOLESTR szData
Definition: atlbase.h:244
struct _ATL_TERMFUNC_ELEM_TAG * pNext
Definition: atlbase.h:119
_ATL_TERMFUNC * pFunc
Definition: atlbase.h:117
CSimpleArray m_rgWindowClassAtoms
Definition: atlbase.h:203
CComCriticalSection m_csWindowCreate
Definition: atlbase.h:201
_AtlCreateWndData * m_pCreateWndList
Definition: atlbase.h:202
struct _AtlCreateWndData_TAG * m_pNext
Definition: atlbase.h:126
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1830
uint32_t DWORD_PTR
Definition: typedefs.h:65
uint32_t * LPDWORD
Definition: typedefs.h:59
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
Definition: wincrypt.h:6082
#define HRESULT
Definition: msvc.h:7
#define WINAPI
Definition: msvc.h:6
const char * LPCSTR
Definition: xmlstorage.h:183
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185