ReactOS  0.4.14-dev-614-gbfd8a84
atl30.c
Go to the documentation of this file.
1 /*
2  * Implementation of Active Template Library (atl.dll)
3  *
4  * Copyright 2004 Aric Stewart for CodeWeavers
5  * Copyright 2005 Jacek Caban
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20  */
21 
22 #include <stdio.h>
23 
24 #define COBJMACROS
25 
26 #include "objidl.h"
27 #include "rpcproxy.h"
28 #include "wine/atlbase.h"
29 #include "wine/atlwin.h"
30 
31 #include "wine/debug.h"
32 
34 
35 extern HINSTANCE atl_instance;
36 
37 #define ATLVer1Size FIELD_OFFSET(_ATL_MODULEW, dwAtlBuildVer)
38 
40 {
41  INT i;
42  UINT size;
43 
44  TRACE("(%p %p %p)\n", pM, p, h);
45 
46  size = pM->cbSize;
47  switch (size)
48  {
49  case ATLVer1Size:
50  case sizeof(_ATL_MODULEW):
51 #ifdef _WIN64
52  case sizeof(_ATL_MODULEW) + sizeof(void *):
53 #endif
54  break;
55  default:
56  WARN("Unknown structure version (size %i)\n",size);
57  return E_INVALIDARG;
58  }
59 
60  memset(pM,0,pM->cbSize);
61  pM->cbSize = size;
62  pM->m_hInst = h;
63  pM->m_hInstResource = h;
64  pM->m_hInstTypeLib = h;
65  pM->m_pObjMap = p;
66  pM->m_hHeap = GetProcessHeap();
67 
71 
72  /* call mains */
73  i = 0;
74  if (pM->m_pObjMap != NULL && size > ATLVer1Size)
75  {
76  while (pM->m_pObjMap[i].pclsid != NULL)
77  {
78  TRACE("Initializing object %i %p\n",i,p[i].pfnObjectMain);
79  if (p[i].pfnObjectMain)
80  p[i].pfnObjectMain(TRUE);
81  i++;
82  }
83  }
84 
85  return S_OK;
86 }
87 
89 {
91 
92  if (mod->cbSize == ATLVer1Size)
93  ret = (_ATL_OBJMAP_ENTRYW_V1 *)mod->m_pObjMap + index;
94  else
95  ret = (_ATL_OBJMAP_ENTRYW_V1 *)(mod->m_pObjMap + index);
96 
97  if (!ret->pclsid) ret = NULL;
98  return ret;
99 }
100 
102  BSTR *pbstrPath, ITypeLib **ppTypeLib)
103 {
104  TRACE("(%p, %s, %p, %p)\n", pM, debugstr_w(lpszIndex), pbstrPath, ppTypeLib);
105 
106  if (!pM)
107  return E_INVALIDARG;
108 
109  return AtlLoadTypeLib(pM->m_hInstTypeLib, lpszIndex, pbstrPath, ppTypeLib);
110 }
111 
113 {
114  _ATL_TERMFUNC_ELEM *iter, *tmp;
115 
116  TRACE("(%p)\n", pM);
117 
118  if (pM->cbSize > ATLVer1Size)
119  {
120  iter = pM->m_pTermFuncs;
121 
122  while(iter) {
123  iter->pFunc(iter->dw);
124  tmp = iter;
125  iter = iter->pNext;
126  HeapFree(GetProcessHeap(), 0, tmp);
127  }
128  }
129 
130  return S_OK;
131 }
132 
134  DWORD dwFlags)
135 {
137  int i=0;
138 
139  TRACE("(%p %i %i)\n",pM, dwClsContext, dwFlags);
140 
141  if (pM == NULL)
142  return E_INVALIDARG;
143 
144  while ((obj = get_objmap_entry( pM, i++ )))
145  {
147  HRESULT rc;
148 
149  TRACE("Registering object %i\n",i);
150  if (obj->pfnGetClassObject)
151  {
152  rc = obj->pfnGetClassObject(obj->pfnCreateInstance, &IID_IUnknown,
153  (LPVOID*)&pUnknown);
154  if (SUCCEEDED (rc) )
155  {
156  rc = CoRegisterClassObject(obj->pclsid, pUnknown, dwClsContext,
157  dwFlags, &obj->dwRegister);
158 
159  if (FAILED (rc) )
160  WARN("Failed to register object %i: 0x%08x\n", i, rc);
161 
162  if (pUnknown)
163  IUnknown_Release(pUnknown);
164  }
165  }
166  }
167 
168  return S_OK;
169 }
170 
172 {
173  FIXME("(%p, %i, %p) stub\n", pM, bUnRegTypeLib, pCLSID);
174  return S_OK;
175 }
176 
177 /***********************************************************************
178  * AtlModuleRegisterServer [ATL.@]
179  *
180  */
182 {
183  const _ATL_OBJMAP_ENTRYW_V1 *obj;
184  int i;
185  HRESULT hRes;
186 
187  TRACE("%p %d %s\n", pM, bRegTypeLib, debugstr_guid(clsid));
188 
189  if (pM == NULL)
190  return E_INVALIDARG;
191 
192  for (i = 0; (obj = get_objmap_entry( pM, i )) != NULL; i++) /* register CLSIDs */
193  {
194  if (!clsid || IsEqualCLSID(obj->pclsid, clsid))
195  {
196  TRACE("Registering clsid %s\n", debugstr_guid(obj->pclsid));
197  hRes = obj->pfnUpdateRegistry(TRUE); /* register */
198  if (FAILED(hRes))
199  return hRes;
200 
201  if(pM->cbSize > ATLVer1Size) {
202  const struct _ATL_CATMAP_ENTRY *catmap;
203 
204  catmap = ((const _ATL_OBJMAP_ENTRYW*)obj)->pfnGetCategoryMap();
205  if(catmap) {
206  hRes = AtlRegisterClassCategoriesHelper(obj->pclsid, catmap, TRUE);
207  if(FAILED(hRes))
208  return hRes;
209  }
210  }
211  }
212  }
213 
214  if (bRegTypeLib)
215  {
217  if (FAILED(hRes))
218  return hRes;
219  }
220 
221  return S_OK;
222 }
223 
224 /***********************************************************************
225  * AtlModuleGetClassObject [ATL.@]
226  */
228  REFIID riid, LPVOID *ppv)
229 {
231  int i;
233 
234  TRACE("%p %s %s %p\n", pm, debugstr_guid(rclsid), debugstr_guid(riid), ppv);
235 
236  if (pm == NULL)
237  return E_INVALIDARG;
238 
239  for (i = 0; (obj = get_objmap_entry( pm, i )) != NULL; i++)
240  {
241  if (IsEqualCLSID(obj->pclsid, rclsid))
242  {
243  TRACE("found object %i\n", i);
244  if (obj->pfnGetClassObject)
245  {
246  if (!obj->pCF)
247  hres = obj->pfnGetClassObject(obj->pfnCreateInstance,
248  &IID_IUnknown,
249  (void **)&obj->pCF);
250  if (obj->pCF)
251  hres = IUnknown_QueryInterface(obj->pCF, riid, ppv);
252  break;
253  }
254  }
255  }
256 
257  WARN("no class object found for %s\n", debugstr_guid(rclsid));
258 
259  return hres;
260 }
261 
262 /***********************************************************************
263  * AtlModuleGetClassObject [ATL.@]
264  */
266 {
267  TRACE("%p %s\n", pm, debugstr_w(lpszIndex));
268 
269  if (!pm)
270  return E_INVALIDARG;
271 
272  return AtlRegisterTypeLib(pm->m_hInstTypeLib, lpszIndex);
273 }
274 
275 /***********************************************************************
276  * AtlModuleRevokeClassObjects [ATL.@]
277  */
279 {
280  FIXME("%p\n", pm);
281  return E_FAIL;
282 }
283 
284 /***********************************************************************
285  * AtlModuleUnregisterServer [ATL.@]
286  */
288 {
289  FIXME("%p %s\n", pm, debugstr_guid(clsid));
290  return E_FAIL;
291 }
292 
293 /***********************************************************************
294  * AtlModuleRegisterWndClassInfoA [ATL.@]
295  *
296  * See AtlModuleRegisterWndClassInfoW.
297  */
299 {
300  ATOM atom;
301 
302  FIXME("%p %p %p semi-stub\n", pm, wci, pProc);
303 
304  atom = wci->m_atom;
305  if (!atom)
306  {
307  WNDCLASSEXA wc;
308 
309  TRACE("wci->m_wc.lpszClassName = %s\n", wci->m_wc.lpszClassName);
310 
311  if (wci->m_lpszOrigName)
312  FIXME( "subclassing %s not implemented\n", debugstr_a(wci->m_lpszOrigName));
313 
314  if (!wci->m_wc.lpszClassName)
315  {
316  sprintf(wci->m_szAutoName, "ATL%08lx", (UINT_PTR)wci);
317  TRACE("auto-generated class name %s\n", wci->m_szAutoName);
318  wci->m_wc.lpszClassName = wci->m_szAutoName;
319  }
320 
321  atom = GetClassInfoExA(pm->m_hInst, wci->m_wc.lpszClassName, &wc);
322  if (!atom)
323  {
324  wci->m_wc.hInstance = pm->m_hInst;
325  wci->m_wc.hCursor = LoadCursorA( wci->m_bSystemCursor ? NULL : pm->m_hInst,
326  wci->m_lpszCursorID );
327  atom = RegisterClassExA(&wci->m_wc);
328  }
329  wci->pWndProc = wci->m_wc.lpfnWndProc;
330  wci->m_atom = atom;
331  }
332 
333  if (wci->m_lpszOrigName) *pProc = wci->pWndProc;
334 
335  TRACE("returning 0x%04x\n", atom);
336  return atom;
337 }
338 
339 /***********************************************************************
340  * AtlModuleRegisterWndClassInfoW [ATL.@]
341  *
342  * PARAMS
343  * pm [IO] Information about the module registering the window.
344  * wci [IO] Information about the window being registered.
345  * pProc [O] Window procedure of the registered class.
346  *
347  * RETURNS
348  * Atom representing the registered class.
349  *
350  * NOTES
351  * Can be called multiple times without error, unlike RegisterClassEx().
352  *
353  * If the class name is NULL, then a class with a name of "ATLxxxxxxxx" is
354  * registered, where the 'x's represent a unique value.
355  *
356  */
358 {
359  ATOM atom;
360 
361  FIXME("%p %p %p semi-stub\n", pm, wci, pProc);
362 
363  atom = wci->m_atom;
364  if (!atom)
365  {
366  WNDCLASSEXW wc;
367 
368  TRACE("wci->m_wc.lpszClassName = %s\n", debugstr_w(wci->m_wc.lpszClassName));
369 
370  if (wci->m_lpszOrigName)
371  FIXME( "subclassing %s not implemented\n", debugstr_w(wci->m_lpszOrigName));
372 
373  if (!wci->m_wc.lpszClassName)
374  {
375  static const WCHAR szFormat[] = {'A','T','L','%','0','8','l','x',0};
376  swprintf(wci->m_szAutoName, szFormat, (UINT_PTR)wci);
377  TRACE("auto-generated class name %s\n", debugstr_w(wci->m_szAutoName));
378  wci->m_wc.lpszClassName = wci->m_szAutoName;
379  }
380 
381  atom = GetClassInfoExW(pm->m_hInst, wci->m_wc.lpszClassName, &wc);
382  if (!atom)
383  {
384  wci->m_wc.hInstance = pm->m_hInst;
385  wci->m_wc.hCursor = LoadCursorW( wci->m_bSystemCursor ? NULL : pm->m_hInst,
386  wci->m_lpszCursorID );
387  atom = RegisterClassExW(&wci->m_wc);
388  }
389  wci->pWndProc = wci->m_wc.lpfnWndProc;
390  wci->m_atom = atom;
391  }
392 
393  if (wci->m_lpszOrigName) *pProc = wci->pWndProc;
394 
395  TRACE("returning 0x%04x\n", atom);
396  return atom;
397 }
398 
399 /***********************************************************************
400  * AtlModuleAddCreateWndData [ATL.@]
401  */
403 {
404  TRACE("(%p, %p, %p)\n", pM, pData, pvObject);
405 
406  pData->m_pThis = pvObject;
407  pData->m_dwThreadID = GetCurrentThreadId();
408 
410  pData->m_pNext = pM->m_pCreateWndList;
411  pM->m_pCreateWndList = pData;
413 }
414 
415 /***********************************************************************
416  * AtlModuleExtractCreateWndData [ATL.@]
417  *
418  * NOTE: Tests show that this function extracts one of _AtlCreateWndData
419  * records from the current thread from a list
420  *
421  */
423 {
425  void *ret = NULL;
426 
427  TRACE("(%p)\n", pM);
428 
430 
431  for(ppData = &pM->m_pCreateWndList; *ppData!=NULL; ppData = &(*ppData)->m_pNext)
432  {
433  if ((*ppData)->m_dwThreadID == GetCurrentThreadId())
434  {
436  *ppData = pData->m_pNext;
437  ret = pData->m_pThis;
438  break;
439  }
440  }
441 
443  return ret;
444 }
445 
446 /***********************************************************************
447  * AtlModuleUpdateRegistryFromResourceD [ATL.@]
448  *
449  */
451  BOOL bRegister, struct _ATL_REGMAP_ENTRY* pMapEntries, IRegistrar* pReg)
452 {
453  TRACE("(%p %s %d %p %p)\n", pM, debugstr_w(lpszRes), bRegister, pMapEntries, pReg);
454 
455  return AtlUpdateRegistryFromResourceD(pM->m_hInst, lpszRes, bRegister, pMapEntries, pReg);
456 }
457 
459 {
460  TRACE("(%p)->(%s %p)\n", iface, debugstr_guid(riid), ppvObject);
461 
463  *ppvObject = iface;
464  IClassFactory_AddRef( iface );
465  return S_OK;
466  }
467 
468  return E_NOINTERFACE;
469 }
470 
472 {
473  return 2;
474 }
475 
477 {
478  return 1;
479 }
480 
482  REFIID riid, void **ppv)
483 {
484  IRegistrar *registrar;
485  HRESULT hres;
486 
487  TRACE("(%p)->(%s %p)\n", iface, debugstr_guid(riid), ppv);
488 
489  if(pUnkOuter) {
490  *ppv = NULL;
491  return CLASS_E_NOAGGREGATION;
492  }
493 
494  hres = AtlCreateRegistrar(&registrar);
495  if(FAILED(hres))
496  return hres;
497 
498  hres = IRegistrar_QueryInterface(registrar, riid, ppv);
499  IRegistrar_Release(registrar);
500  return hres;
501 }
502 
504 {
505  TRACE("(%p)->(%x)\n", iface, lock);
506  return S_OK;
507 }
508 
509 static const IClassFactoryVtbl IRegistrarCFVtbl = {
515 };
516 
518 
519 #ifdef __REACTOS__
520 static HRESULT do_register_dll_server(IRegistrar *pRegistrar, LPCOLESTR wszDll,
521  LPCOLESTR wszId, BOOL do_register,
522  const struct _ATL_REGMAP_ENTRY* pMapEntries)
523 {
524  IRegistrar *registrar;
525  HRESULT hres;
526  const struct _ATL_REGMAP_ENTRY *pMapEntry;
527 
528  static const WCHAR wszModule[] = {'M','O','D','U','L','E',0};
529  static const WCHAR wszRegistry[] = {'R','E','G','I','S','T','R','Y',0};
530 
531  if(pRegistrar) {
532  registrar = pRegistrar;
533  }else {
534  hres = AtlCreateRegistrar(&registrar);
535  if(FAILED(hres))
536  return hres;
537  }
538 
539  IRegistrar_AddReplacement(registrar, wszModule, wszDll);
540 
541  for (pMapEntry = pMapEntries; pMapEntry && pMapEntry->szKey; pMapEntry++)
542  IRegistrar_AddReplacement(registrar, pMapEntry->szKey, pMapEntry->szData);
543 
544  if(do_register)
545  hres = IRegistrar_ResourceRegisterSz(registrar, wszDll, wszId, wszRegistry);
546  else
547  hres = IRegistrar_ResourceUnregisterSz(registrar, wszDll, wszId, wszRegistry);
548 
549  if(registrar != pRegistrar)
550  IRegistrar_Release(registrar);
551  return hres;
552 }
553 
554 static HRESULT do_register_server(BOOL do_register)
555 {
556  static const WCHAR CLSID_RegistrarW[] =
557  {'C','L','S','I','D','_','R','e','g','i','s','t','r','a','r',0};
558  static const WCHAR atl_dllW[] = {'a','t','l','.','d','l','l',0};
559 
560  WCHAR clsid_str[40];
561  const struct _ATL_REGMAP_ENTRY reg_map[] = {{CLSID_RegistrarW, clsid_str}, {NULL,NULL}};
562 
563  StringFromGUID2(&CLSID_Registrar, clsid_str, sizeof(clsid_str)/sizeof(WCHAR));
564  return do_register_dll_server(NULL, atl_dllW, MAKEINTRESOURCEW(101), do_register, reg_map);
565 }
566 #endif
567 
568 /**************************************************************
569  * DllGetClassObject (ATL.2)
570  */
572 {
573  TRACE("(%s %s %p)\n", debugstr_guid(clsid), debugstr_guid(riid), ppvObject);
574 
575  if(IsEqualGUID(&CLSID_Registrar, clsid))
576  return IClassFactory_QueryInterface( &RegistrarCF, riid, ppvObject );
577 
578  FIXME("Not supported class %s\n", debugstr_guid(clsid));
580 }
581 
582 /***********************************************************************
583  * DllRegisterServer (ATL.@)
584  */
586 {
587 #ifdef __REACTOS__
588  /* Note: we can't use __wine_register_server here because it uses CLSID_Registrar which isn't registred yet */
589  return do_register_server(TRUE);
590 #else
592 #endif
593 }
594 
595 /***********************************************************************
596  * DllUnRegisterServer (ATL.@)
597  */
599 {
600 #ifdef __REACTOS__
601  return do_register_server(FALSE);
602 #else
604 #endif
605 }
606 
607 /***********************************************************************
608  * DllCanUnloadNow (ATL.@)
609  */
611 {
612  return S_FALSE;
613 }
LPCWSTR m_lpszOrigName
Definition: atlwin.h:38
LPCOLESTR szData
Definition: atlbase.h:244
HRESULT WINAPI AtlModuleRevokeClassObjects(_ATL_MODULEW *pm)
Definition: atl30.c:278
static ULONG WINAPI RegistrarCF_AddRef(IClassFactory *iface)
Definition: atl30.c:471
#define REFIID
Definition: guiddef.h:118
#define TRUE
Definition: types.h:120
BOOL WINAPI GetClassInfoExW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _Out_ LPWNDCLASSEXW)
#define E_NOINTERFACE
Definition: winerror.h:2364
HRESULT WINAPI AtlCreateRegistrar(IRegistrar **ret)
Definition: registrar.c:687
rwlock_t lock
Definition: tcpcore.h:1163
CRITICAL_SECTION m_csWindowCreate
Definition: atlbase.h:170
HCURSOR hCursor
Definition: winuser.h:3183
WNDPROC lpfnWndProc
Definition: winuser.h:3178
HRESULT __wine_register_resources(HMODULE module) DECLSPEC_HIDDEN
Definition: register.c:98
union _ATL_MODULEW_TAG::@3435 u
LPCSTR lpszClassName
Definition: winuser.h:3186
WORD ATOM
Definition: dimm.idl:113
ATOM WINAPI AtlModuleRegisterWndClassInfoW(_ATL_MODULEW *pm, _ATL_WNDCLASSINFOW *wci, WNDPROC *pProc)
Definition: atl30.c:357
REFIID riid
Definition: precomp.h:44
WINE_DEFAULT_DEBUG_CHANNEL(atl)
HRESULT WINAPI AtlModuleGetClassObject(_ATL_MODULEW *pm, REFCLSID rclsid, REFIID riid, LPVOID *ppv)
Definition: atl30.c:227
HRESULT WINAPI AtlModuleUnregisterServer(_ATL_MODULEW *pm, const CLSID *clsid)
Definition: atl30.c:287
WNDCLASSEXW m_wc
Definition: atlwin.h:37
HRESULT WINAPI DllUnregisterServer(void)
Definition: atl30.c:598
#define REFCLSID
Definition: guiddef.h:117
#define WARN(fmt,...)
Definition: debug.h:111
static LPMONITOREX pm
Definition: localmon.c:45
REFIID LPVOID * ppv
Definition: atlbase.h:39
LPCWSTR m_lpszCursorID
Definition: atlwin.h:40
_AtlCreateWndData * m_pCreateWndList
Definition: atlbase.h:174
CHAR m_szAutoName[14]
Definition: atlwin.h:32
OLECHAR * BSTR
Definition: compat.h:1942
static HRESULT WINAPI RegistrarCF_QueryInterface(IClassFactory *iface, REFIID riid, void **ppvObject)
Definition: atl30.c:458
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
HRESULT WINAPI AtlModuleRegisterTypeLib(_ATL_MODULEW *pm, LPCOLESTR lpszIndex)
Definition: atl30.c:265
HRESULT WINAPI DllCanUnloadNow(void)
Definition: atl30.c:610
#define E_FAIL
Definition: ddrawi.h:102
HRESULT WINAPI AtlModuleInit(_ATL_MODULEW *pM, _ATL_OBJMAP_ENTRYW *p, HINSTANCE h)
Definition: atl30.c:39
#define CLASS_E_CLASSNOTAVAILABLE
Definition: winerror.h:2663
int32_t INT
Definition: typedefs.h:56
HRESULT WINAPI AtlModuleUpdateRegistryFromResourceD(_ATL_MODULEW *pM, LPCOLESTR lpszRes, BOOL bRegister, struct _ATL_REGMAP_ENTRY *pMapEntries, IRegistrar *pReg)
Definition: atl30.c:450
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
GLsizei GLsizei GLuint * obj
Definition: glext.h:6042
_ATL_TERMFUNC_ELEM * m_pTermFuncs
Definition: atlbase.h:194
#define sprintf(buf, format,...)
Definition: sprintf.c:55
ATOM WINAPI RegisterClassExW(_In_ CONST WNDCLASSEXW *)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
HRESULT WINAPI AtlModuleLoadTypeLib(_ATL_MODULEW *pM, LPCOLESTR lpszIndex, BSTR *pbstrPath, ITypeLib **ppTypeLib)
Definition: atl30.c:101
HINSTANCE hInstance
Definition: winuser.h:3181
unsigned int BOOL
Definition: ntddk_ex.h:94
WCHAR m_szAutoName[14]
Definition: atlwin.h:43
static LPUNKNOWN
Definition: ndr_ole.c:49
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
LPCOLESTR szKey
Definition: atlbase.h:243
#define S_FALSE
Definition: winerror.h:2357
#define E_INVALIDARG
Definition: ddrawi.h:101
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
Definition: synch.c:751
smooth NULL
Definition: ftsmooth.c:416
_ATL_TERMFUNC * pFunc
Definition: atlbase.h:117
HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID riid, LPVOID *ppvObject)
Definition: atl30.c:571
static const IClassFactoryVtbl IRegistrarCFVtbl
Definition: atl30.c:509
UINT cbSize
Definition: atlbase.h:192
static HRESULT WINAPI RegistrarCF_LockServer(IClassFactory *iface, BOOL lock)
Definition: atl30.c:503
HRESULT WINAPI AtlRegisterTypeLib(HINSTANCE inst, const WCHAR *index)
Definition: atl.c:399
GLuint index
Definition: glext.h:6031
#define debugstr_guid
Definition: kernel32.h:35
DWORD WINAPI GetCurrentThreadId(VOID)
Definition: thread.c:458
LPCWSTR lpszClassName
Definition: winuser.h:3201
_In_ PUNKNOWN pUnknown
Definition: drmk.h:76
ATOM WINAPI AtlModuleRegisterWndClassInfoA(_ATL_MODULEA *pm, _ATL_WNDCLASSINFOA *wci, WNDPROC *pProc)
Definition: atl30.c:298
HRESULT WINAPI AtlModuleUnregisterServerEx(_ATL_MODULEW *pM, BOOL bUnRegTypeLib, const CLSID *pCLSID)
Definition: atl30.c:171
CRITICAL_SECTION m_csObjMap
Definition: atlbase.h:171
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
HRESULT hres
Definition: protocol.c:465
#define GetProcessHeap()
Definition: compat.h:403
__wchar_t WCHAR
Definition: xmlstorage.h:180
const CLSID * pclsid
Definition: atlbase.h:86
#define debugstr_a
Definition: kernel32.h:31
LONG HRESULT
Definition: typedefs.h:77
static _ATL_OBJMAP_ENTRYW_V1 * get_objmap_entry(_ATL_MODULEW *mod, unsigned int index)
Definition: atl30.c:88
const GUID IID_IUnknown
LPCSTR m_lpszCursorID
Definition: atlwin.h:29
#define swprintf(buf, format,...)
Definition: sprintf.c:56
#define WINAPI
Definition: msvc.h:6
INT WINAPI StringFromGUID2(REFGUID id, LPOLESTR str, INT cmax)
Definition: compobj.c:2434
HINSTANCE m_hInstResource
Definition: atlbase.h:160
HRESULT WINAPI AtlModuleRegisterClassObjects(_ATL_MODULEW *pM, DWORD dwClsContext, DWORD dwFlags)
Definition: atl30.c:133
unsigned long DWORD
Definition: ntddk_ex.h:95
struct _ATL_TERMFUNC_ELEM_TAG * pNext
Definition: atlbase.h:119
HINSTANCE m_hInstTypeLib
Definition: atlbase.h:161
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2074
CRITICAL_SECTION m_csTypeInfoHolder
Definition: atlbase.h:167
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274
HINSTANCE m_hInst
Definition: atlbase.h:159
HINSTANCE hInstance
Definition: winuser.h:3196
PSDBQUERYRESULT_VISTA PVOID * ppData
Definition: env.c:54
HRESULT WINAPI AtlUpdateRegistryFromResourceD(HINSTANCE inst, LPCOLESTR res, BOOL bRegister, struct _ATL_REGMAP_ENTRY *pMapEntries, IRegistrar *pReg)
Definition: registrar.c:706
HRESULT WINAPI AtlModuleRegisterServer(_ATL_MODULEW *pM, BOOL bRegTypeLib, const CLSID *clsid)
Definition: atl30.c:181
int ret
REFCLSID clsid
Definition: msctf.c:82
#define index(s, c)
Definition: various.h:29
HRESULT __wine_unregister_resources(HMODULE module) DECLSPEC_HIDDEN
Definition: register.c:110
static ULONG WINAPI RegistrarCF_Release(IClassFactory *iface)
Definition: atl30.c:476
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
HRESULT WINAPI AtlLoadTypeLib(HINSTANCE inst, LPCOLESTR lpszIndex, BSTR *pbstrPath, ITypeLib **ppTypeLib)
Definition: atl.c:341
REFIID LPVOID * ppvObject
Definition: precomp.h:44
HCURSOR hCursor
Definition: winuser.h:3198
WNDCLASSEXA m_wc
Definition: atlwin.h:26
ATOM WINAPI RegisterClassExA(_In_ CONST WNDCLASSEXA *)
#define CLASS_E_NOAGGREGATION
Definition: winerror.h:2662
HCURSOR WINAPI LoadCursorA(_In_opt_ HINSTANCE, _In_ LPCSTR)
Definition: cursoricon.c:2059
void *WINAPI AtlModuleExtractCreateWndData(_ATL_MODULEW *pM)
Definition: atl30.c:422
WNDPROC lpfnWndProc
Definition: winuser.h:3193
#define ATLVer1Size
Definition: atl30.c:37
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:2881
HRESULT WINAPI CoRegisterClassObject(REFCLSID rclsid, LPUNKNOWN pUnk, DWORD dwClsContext, DWORD flags, LPDWORD lpdwRegister)
Definition: compobj.c:2897
BOOL WINAPI GetClassInfoExA(_In_opt_ HINSTANCE, _In_ LPCSTR, _Out_ LPWNDCLASSEXA)
#define S_OK
Definition: intsafe.h:59
void WINAPI AtlModuleAddCreateWndData(_ATL_MODULEW *pM, _AtlCreateWndData *pData, void *pvObject)
Definition: atl30.c:402
struct _ATL_MODULEW_TAG _ATL_MODULEW
HANDLE m_hHeap
Definition: atlbase.h:164
HRESULT WINAPI DllRegisterServer(void)
Definition: atl30.c:585
unsigned int UINT
Definition: ndis.h:50
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112
_ATL_OBJMAP_ENTRYW * m_pObjMap
Definition: atlbase.h:162
Definition: atlbase.h:241
HINSTANCE atl_instance
Definition: atl.c:36
HRESULT WINAPI AtlRegisterClassCategoriesHelper(REFCLSID clsid, const struct _ATL_CATMAP_ENTRY *catmap, BOOL reg)
Definition: atl.c:747
unsigned int ULONG
Definition: retypes.h:1
static HRESULT WINAPI RegistrarCF_CreateInstance(IClassFactory *iface, LPUNKNOWN pUnkOuter, REFIID riid, void **ppv)
Definition: atl30.c:481
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
LPCSTR m_lpszOrigName
Definition: atlwin.h:27
GLfloat GLfloat p
Definition: glext.h:8902
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1827
const GUID IID_IClassFactory
#define memset(x, y, z)
Definition: compat.h:39
Definition: atlbase.h:247
#define IsEqualCLSID(rclsid1, rclsid2)
Definition: guiddef.h:96
static IClassFactory RegistrarCF
Definition: atl30.c:517
#define HeapFree(x, y, z)
Definition: compat.h:402
#define SUCCEEDED(hr)
Definition: intsafe.h:57
HRESULT WINAPI AtlModuleTerm(_ATL_MODULE *pM)
Definition: atl30.c:112
static int mod
Definition: i386-dis.c:1273