2 * Implementation of the Active Template Library (atl.dll)
4 * Copyright 2004 Aric Stewart for CodeWeavers
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.
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.
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
21 #ifndef __WINE_ATLBASE_H__
22 #define __WINE_ATLBASE_H__
26 typedef HRESULT (WINAPI _ATL_CREATORFUNC)(void* pv, REFIID riid, LPVOID* ppv);
27 typedef HRESULT (WINAPI _ATL_CREATORARGFUNC)(void* pv, REFIID riid, LPVOID* ppv, DWORD dw);
28 typedef HRESULT (WINAPI _ATL_MODULEFUNC)(DWORD dw);
29 typedef LPCSTR (WINAPI _ATL_DESCRIPTIONFUNCA)(void);
30 typedef LPCWSTR (WINAPI _ATL_DESCRIPTIONFUNCW)(void);
31 typedef const struct _ATL_CATMAP_ENTRY* (_ATL_CATMAPFUNC)(void);
32 typedef void (WINAPI _ATL_TERMFUNC)(DWORD dw);
34 typedef struct _ATL_OBJMAP_ENTRYA_V1_TAG
37 HRESULT (WINAPI *pfnUpdateRegistry)(BOOL bRegister);
38 _ATL_CREATORFUNC* pfnGetClassObject;
39 _ATL_CREATORFUNC* pfnCreateInstance;
42 _ATL_DESCRIPTIONFUNCA* pfnGetObjectDescription;
43 }_ATL_OBJMAP_ENTRYA_V1;
45 typedef struct _ATL_OBJMAP_ENTRYW_V1_TAG
48 HRESULT (WINAPI *pfnUpdateRegistry)(BOOL bRegister);
49 _ATL_CREATORFUNC* pfnGetClassObject;
50 _ATL_CREATORFUNC* pfnCreateInstance;
53 _ATL_DESCRIPTIONFUNCW* pfnGetObjectDescription;
54 } _ATL_OBJMAP_ENTRYW_V1;
56 typedef struct _ATL_OBJMAP_ENTRYA_TAG
59 HRESULT (WINAPI *pfnUpdateRegistry)(BOOL bRegister);
60 _ATL_CREATORFUNC* pfnGetClassObject;
61 _ATL_CREATORFUNC* pfnCreateInstance;
64 _ATL_DESCRIPTIONFUNCA* pfnGetObjectDescription;
65 _ATL_CATMAPFUNC* pfnGetCategoryMap;
66 void (WINAPI *pfnObjectMain)(BOOL bStarting);
69 typedef struct _ATL_OBJMAP_ENTRYW_TAG
72 HRESULT (WINAPI *pfnUpdateRegistry)(BOOL bRegister);
73 _ATL_CREATORFUNC* pfnGetClassObject;
74 _ATL_CREATORFUNC* pfnCreateInstance;
77 _ATL_DESCRIPTIONFUNCW* pfnGetObjectDescription;
78 _ATL_CATMAPFUNC* pfnGetCategoryMap;
79 void (WINAPI *pfnObjectMain)(BOOL bStarting);
83 typedef struct _ATL_TERMFUNC_ELEM_TAG
87 struct _ATL_TERMFUNC_ELEM_TAG* pNext;
90 typedef struct _AtlCreateWndData_TAG
94 struct _AtlCreateWndData_TAG* m_pNext;
97 typedef struct _ATL_MODULEA_TAG
101 HINSTANCE m_hInstResource;
102 HINSTANCE m_hInstTypeLib;
103 _ATL_OBJMAP_ENTRYA* m_pObjMap;
108 CRITICAL_SECTION m_csTypeInfoHolder;
109 CRITICAL_SECTION m_csStaticDataInit;
111 CRITICAL_SECTION m_csWindowCreate;
112 CRITICAL_SECTION m_csObjMap;
115 _AtlCreateWndData* m_pCreateWndList;
121 _ATL_TERMFUNC_ELEM* m_pTermFuncs;
124 typedef struct _ATL_MODULEW_TAG
128 HINSTANCE m_hInstResource;
129 HINSTANCE m_hInstTypeLib;
130 _ATL_OBJMAP_ENTRYW* m_pObjMap;
135 CRITICAL_SECTION m_csTypeInfoHolder;
136 CRITICAL_SECTION m_csStaticDataInit;
138 CRITICAL_SECTION m_csWindowCreate;
139 CRITICAL_SECTION m_csObjMap;
142 _AtlCreateWndData* m_pCreateWndList;
148 _ATL_TERMFUNC_ELEM* m_pTermFuncs;
151 typedef struct _ATL_INTMAP_ENTRY_TAG
155 _ATL_CREATORARGFUNC* pFunc;
158 struct _ATL_REGMAP_ENTRY
164 HRESULT WINAPI AtlAdvise(IUnknown *pUnkCP, IUnknown *pUnk, const IID * iid, LPDWORD dpw);
165 HRESULT WINAPI AtlAxAttachControl(IUnknown*,HWND,IUnknown**);
166 HRESULT WINAPI AtlAxCreateControl(LPCOLESTR,HWND,IStream*,IUnknown**);
167 HRESULT WINAPI AtlAxCreateControlEx(LPCOLESTR,HWND,IStream*,IUnknown**,IUnknown**,REFIID,IUnknown*);
168 HRESULT WINAPI AtlFreeMarshalStream(IStream *pStream);
169 HRESULT WINAPI AtlInternalQueryInterface(void* pThis, const _ATL_INTMAP_ENTRY* pEntries, REFIID iid, void** ppvObject);
170 HRESULT WINAPI AtlMarshalPtrInProc(IUnknown *pUnk, const IID *iid, IStream **ppStream);
171 void WINAPI AtlModuleAddCreateWndData(_ATL_MODULEW *pM, _AtlCreateWndData *pData, void* pvObject);
172 HRESULT WINAPI AtlModuleAddTermFunc(_ATL_MODULEW *pM, _ATL_TERMFUNC *pFunc, DWORD_PTR dw);
173 void* WINAPI AtlModuleExtractCreateWndData(_ATL_MODULEW *pM);
174 HRESULT WINAPI AtlModuleInit(_ATL_MODULEW* pM, _ATL_OBJMAP_ENTRYW* p, HINSTANCE h);
175 HRESULT WINAPI AtlModuleLoadTypeLib(_ATL_MODULEW *pM, LPCOLESTR lpszIndex, BSTR *pbstrPath, ITypeLib **ppTypeLib);
176 HRESULT WINAPI AtlModuleRegisterClassObjects(_ATL_MODULEW* pM, DWORD dwClsContext, DWORD dwFlags);
177 HRESULT WINAPI AtlModuleRegisterServer(_ATL_MODULEW* pM, BOOL bRegTypeLib, const CLSID* pCLSID);
178 HRESULT WINAPI AtlModuleRegisterTypeLib(_ATL_MODULEW *pM, LPCOLESTR lpszIndex);
179 HRESULT WINAPI AtlModuleUnregisterServer(_ATL_MODULEW* pM, const CLSID* pCLSID);
180 HRESULT WINAPI AtlModuleUpdateRegistryFromResourceD(_ATL_MODULEW *pM, LPCOLESTR lpszRes, BOOL bRegister, struct _ATL_REGMAP_ENTRY *pMapEntries, IRegistrar *pReg );
181 HRESULT WINAPI AtlModuleUnregisterServerEx(_ATL_MODULEW* pM, BOOL bUnRegTypeLib, const CLSID* pCLSID);
182 HRESULT WINAPI AtlModuleTerm(_ATL_MODULEW* pM);
183 HRESULT WINAPI AtlUnadvise(IUnknown *pUnkCP, const IID * iid, DWORD dw);
184 HRESULT WINAPI AtlUnmarshalPtr(IStream *pStream, const IID *iid, IUnknown **ppUnk);
185 HRESULT WINAPI AtlCreateRegistrar(IRegistrar**);
187 #endif /* __WINE_ATLBASE_H__ */