ReactOS 0.4.16-dev-306-g647d351
atl30.c File Reference
#include <stdio.h>
#include "objidl.h"
#include "rpcproxy.h"
#include "wine/atlbase.h"
#include "wine/atlwin.h"
#include "wine/debug.h"
Include dependency graph for atl30.c:

Go to the source code of this file.

Macros

#define COBJMACROS
 
#define ATLVer1Size   FIELD_OFFSET(_ATL_MODULEW, dwAtlBuildVer)
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (atl)
 
HRESULT WINAPI AtlModuleInit (_ATL_MODULEW *pM, _ATL_OBJMAP_ENTRYW *p, HINSTANCE h)
 
static _ATL_OBJMAP_ENTRYW_V1get_objmap_entry (_ATL_MODULEW *mod, unsigned int index)
 
HRESULT WINAPI AtlModuleLoadTypeLib (_ATL_MODULEW *pM, LPCOLESTR lpszIndex, BSTR *pbstrPath, ITypeLib **ppTypeLib)
 
HRESULT WINAPI AtlModuleTerm (_ATL_MODULE *pM)
 
HRESULT WINAPI AtlModuleRegisterClassObjects (_ATL_MODULEW *pM, DWORD dwClsContext, DWORD dwFlags)
 
HRESULT WINAPI AtlModuleUnregisterServerEx (_ATL_MODULEW *pM, BOOL bUnRegTypeLib, const CLSID *pCLSID)
 
HRESULT WINAPI AtlModuleRegisterServer (_ATL_MODULEW *pM, BOOL bRegTypeLib, const CLSID *clsid)
 
HRESULT WINAPI AtlModuleGetClassObject (_ATL_MODULEW *pm, REFCLSID rclsid, REFIID riid, LPVOID *ppv)
 
HRESULT WINAPI AtlModuleRegisterTypeLib (_ATL_MODULEW *pm, LPCOLESTR lpszIndex)
 
HRESULT WINAPI AtlModuleRevokeClassObjects (_ATL_MODULEW *pm)
 
HRESULT WINAPI AtlModuleUnregisterServer (_ATL_MODULEW *pm, const CLSID *clsid)
 
ATOM WINAPI AtlModuleRegisterWndClassInfoA (_ATL_MODULEA *pm, _ATL_WNDCLASSINFOA *wci, WNDPROC *pProc)
 
ATOM WINAPI AtlModuleRegisterWndClassInfoW (_ATL_MODULEW *pm, _ATL_WNDCLASSINFOW *wci, WNDPROC *pProc)
 
void WINAPI AtlModuleAddCreateWndData (_ATL_MODULEW *pM, _AtlCreateWndData *pData, void *pvObject)
 
void *WINAPI AtlModuleExtractCreateWndData (_ATL_MODULEW *pM)
 
HRESULT WINAPI AtlModuleUpdateRegistryFromResourceD (_ATL_MODULEW *pM, LPCOLESTR lpszRes, BOOL bRegister, struct _ATL_REGMAP_ENTRY *pMapEntries, IRegistrar *pReg)
 
static HRESULT WINAPI RegistrarCF_QueryInterface (IClassFactory *iface, REFIID riid, void **ppvObject)
 
static ULONG WINAPI RegistrarCF_AddRef (IClassFactory *iface)
 
static ULONG WINAPI RegistrarCF_Release (IClassFactory *iface)
 
static HRESULT WINAPI RegistrarCF_CreateInstance (IClassFactory *iface, LPUNKNOWN pUnkOuter, REFIID riid, void **ppv)
 
static HRESULT WINAPI RegistrarCF_LockServer (IClassFactory *iface, BOOL lock)
 
HRESULT WINAPI DllGetClassObject (REFCLSID clsid, REFIID riid, LPVOID *ppvObject)
 
HRESULT WINAPI DllRegisterServer (void)
 
HRESULT WINAPI DllUnregisterServer (void)
 
HRESULT WINAPI DllCanUnloadNow (void)
 

Variables

HINSTANCE atl_instance
 
static const IClassFactoryVtbl IRegistrarCFVtbl
 
static IClassFactory RegistrarCF = { &IRegistrarCFVtbl }
 

Macro Definition Documentation

◆ ATLVer1Size

#define ATLVer1Size   FIELD_OFFSET(_ATL_MODULEW, dwAtlBuildVer)

Definition at line 37 of file atl30.c.

◆ COBJMACROS

#define COBJMACROS

Definition at line 24 of file atl30.c.

Function Documentation

◆ AtlModuleAddCreateWndData()

void WINAPI AtlModuleAddCreateWndData ( _ATL_MODULEW pM,
_AtlCreateWndData pData,
void pvObject 
)

Definition at line 405 of file atl30.c.

406{
407 TRACE("(%p, %p, %p)\n", pM, pData, pvObject);
408
409 pData->m_pThis = pvObject;
410 pData->m_dwThreadID = GetCurrentThreadId();
411
413 pData->m_pNext = pM->m_pCreateWndList;
416}
#define TRACE(s)
Definition: solgame.cpp:4
CRITICAL_SECTION m_csWindowCreate
Definition: atlbase.h:170
_AtlCreateWndData * m_pCreateWndList
Definition: atlbase.h:174
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1830
DWORD WINAPI GetCurrentThreadId(void)
Definition: thread.c:459
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)

Referenced by test_winmodule().

◆ AtlModuleExtractCreateWndData()

void *WINAPI AtlModuleExtractCreateWndData ( _ATL_MODULEW pM)

Definition at line 425 of file atl30.c.

426{
428 void *ret = NULL;
429
430 TRACE("(%p)\n", pM);
431
433
434 for(ppData = &pM->m_pCreateWndList; *ppData!=NULL; ppData = &(*ppData)->m_pNext)
435 {
436 if ((*ppData)->m_dwThreadID == GetCurrentThreadId())
437 {
439 *ppData = pData->m_pNext;
440 ret = pData->m_pThis;
441 break;
442 }
443 }
444
446 return ret;
447}
#define NULL
Definition: types.h:112
PSDBQUERYRESULT_VISTA PVOID * ppData
Definition: env.c:56
int ret

Referenced by test_winmodule().

◆ AtlModuleGetClassObject()

HRESULT WINAPI AtlModuleGetClassObject ( _ATL_MODULEW pm,
REFCLSID  rclsid,
REFIID  riid,
LPVOID ppv 
)

Definition at line 227 of file atl30.c.

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,
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}
static _ATL_OBJMAP_ENTRYW_V1 * get_objmap_entry(_ATL_MODULEW *mod, unsigned int index)
Definition: atl30.c:88
#define WARN(fmt,...)
Definition: precomp.h:61
const GUID IID_IUnknown
#define E_INVALIDARG
Definition: ddrawi.h:101
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
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define debugstr_guid
Definition: kernel32.h:35
static LPMONITOREX pm
Definition: localmon.c:45
HRESULT hres
Definition: protocol.c:465
#define IsEqualCLSID(rclsid1, rclsid2)
Definition: guiddef.h:96
#define CLASS_E_CLASSNOTAVAILABLE
Definition: winerror.h:2663

◆ AtlModuleInit()

HRESULT WINAPI AtlModuleInit ( _ATL_MODULEW pM,
_ATL_OBJMAP_ENTRYW p,
HINSTANCE  h 
)

Definition at line 39 of file atl30.c.

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}
#define ATLVer1Size
Definition: atl30.c:37
#define TRUE
Definition: types.h:120
#define GetProcessHeap()
Definition: compat.h:736
GLsizeiptr size
Definition: glext.h:5919
GLfloat GLfloat p
Definition: glext.h:8902
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
struct _ATL_MODULEW_TAG _ATL_MODULEW
#define S_OK
Definition: intsafe.h:52
unsigned int UINT
Definition: ndis.h:50
#define memset(x, y, z)
Definition: compat.h:39
HINSTANCE m_hInstResource
Definition: atlbase.h:160
CRITICAL_SECTION m_csTypeInfoHolder
Definition: atlbase.h:167
HINSTANCE m_hInst
Definition: atlbase.h:159
_ATL_OBJMAP_ENTRYW * m_pObjMap
Definition: atlbase.h:162
CRITICAL_SECTION m_csObjMap
Definition: atlbase.h:171
union _ATL_MODULEW_TAG::@3562 u
HINSTANCE m_hInstTypeLib
Definition: atlbase.h:161
HANDLE m_hHeap
Definition: atlbase.h:164
const CLSID * pclsid
Definition: atlbase.h:86
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
Definition: synch.c:751
int32_t INT
Definition: typedefs.h:58

Referenced by test_StructSize(), test_term(), test_winclassinfo(), and test_winmodule().

◆ AtlModuleLoadTypeLib()

HRESULT WINAPI AtlModuleLoadTypeLib ( _ATL_MODULEW pM,
LPCOLESTR  lpszIndex,
BSTR pbstrPath,
ITypeLib **  ppTypeLib 
)

Definition at line 101 of file atl30.c.

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}
HRESULT WINAPI AtlLoadTypeLib(HINSTANCE inst, LPCOLESTR lpszIndex, BSTR *pbstrPath, ITypeLib **ppTypeLib)
Definition: atl.c:341
#define debugstr_w
Definition: kernel32.h:32

◆ AtlModuleRegisterClassObjects()

HRESULT WINAPI AtlModuleRegisterClassObjects ( _ATL_MODULEW pM,
DWORD  dwClsContext,
DWORD  dwFlags 
)

Definition at line 133 of file atl30.c.

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}
HRESULT WINAPI CoRegisterClassObject(REFCLSID rclsid, LPUNKNOWN pUnk, DWORD dwClsContext, DWORD flags, LPDWORD lpdwRegister)
Definition: compobj.c:2897
_In_ PUNKNOWN pUnknown
Definition: drmk.h:76
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176

◆ AtlModuleRegisterServer()

HRESULT WINAPI AtlModuleRegisterServer ( _ATL_MODULEW pM,
BOOL  bRegTypeLib,
const CLSID clsid 
)

Definition at line 181 of file atl30.c.

182{
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}
HRESULT WINAPI AtlRegisterClassCategoriesHelper(REFCLSID clsid, const struct _ATL_CATMAP_ENTRY *catmap, BOOL reg)
Definition: atl.c:747
HRESULT WINAPI AtlRegisterTypeLib(HINSTANCE inst, const WCHAR *index)
Definition: atl.c:399
REFCLSID clsid
Definition: msctf.c:82
Definition: atlbase.h:248

◆ AtlModuleRegisterTypeLib()

HRESULT WINAPI AtlModuleRegisterTypeLib ( _ATL_MODULEW pm,
LPCOLESTR  lpszIndex 
)

Definition at line 265 of file atl30.c.

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}

◆ AtlModuleRegisterWndClassInfoA()

ATOM WINAPI AtlModuleRegisterWndClassInfoA ( _ATL_MODULEA pm,
_ATL_WNDCLASSINFOA wci,
WNDPROC pProc 
)

Definition at line 298 of file atl30.c.

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:%p", 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}
#define FIXME(fmt,...)
Definition: precomp.h:53
WORD ATOM
Definition: dimm.idl:113
#define debugstr_a
Definition: kernel32.h:31
#define sprintf(buf, format,...)
Definition: sprintf.c:55
LPCSTR m_lpszOrigName
Definition: atlwin.h:27
CHAR m_szAutoName[sizeof("ATL:")+sizeof(void *) *2]
Definition: atlwin.h:32
WNDCLASSEXA m_wc
Definition: atlwin.h:26
LPCSTR m_lpszCursorID
Definition: atlwin.h:29
HINSTANCE hInstance
Definition: winuser.h:3209
HCURSOR hCursor
Definition: winuser.h:3211
WNDPROC lpfnWndProc
Definition: winuser.h:3206
LPCSTR lpszClassName
Definition: winuser.h:3214
BOOL WINAPI GetClassInfoExA(_In_opt_ HINSTANCE, _In_ LPCSTR, _Out_ LPWNDCLASSEXA)
ATOM WINAPI RegisterClassExA(_In_ CONST WNDCLASSEXA *)
HCURSOR WINAPI LoadCursorA(_In_opt_ HINSTANCE, _In_ LPCSTR)
Definition: cursoricon.c:2142

◆ AtlModuleRegisterWndClassInfoW()

ATOM WINAPI AtlModuleRegisterWndClassInfoW ( _ATL_MODULEW pm,
_ATL_WNDCLASSINFOW wci,
WNDPROC pProc 
)

Definition at line 357 of file atl30.c.

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#ifndef __REACTOS__
376 swprintf(wci->m_szAutoName, ARRAY_SIZE(wci->m_szAutoName), L"ATL:%p", wci);
377#else
378 swprintf(wci->m_szAutoName, L"ATL:%p", wci);
379#endif
380 TRACE("auto-generated class name %s\n", debugstr_w(wci->m_szAutoName));
381 wci->m_wc.lpszClassName = wci->m_szAutoName;
382 }
383
384 atom = GetClassInfoExW(pm->m_hInst, wci->m_wc.lpszClassName, &wc);
385 if (!atom)
386 {
387 wci->m_wc.hInstance = pm->m_hInst;
388 wci->m_wc.hCursor = LoadCursorW( wci->m_bSystemCursor ? NULL : pm->m_hInst,
389 wci->m_lpszCursorID );
390 atom = RegisterClassExW(&wci->m_wc);
391 }
392 wci->pWndProc = wci->m_wc.lpfnWndProc;
393 wci->m_atom = atom;
394 }
395
396 if (wci->m_lpszOrigName) *pProc = wci->pWndProc;
397
398 TRACE("returning 0x%04x\n", atom);
399 return atom;
400}
#define ARRAY_SIZE(A)
Definition: main.h:20
#define swprintf
Definition: precomp.h:40
#define L(x)
Definition: ntvdm.h:50
LPCWSTR m_lpszCursorID
Definition: atlwin.h:40
WCHAR m_szAutoName[sizeof("ATL:")+sizeof(void *) *2]
Definition: atlwin.h:43
WNDCLASSEXW m_wc
Definition: atlwin.h:37
LPCWSTR m_lpszOrigName
Definition: atlwin.h:38
LPCWSTR lpszClassName
Definition: winuser.h:3229
WNDPROC lpfnWndProc
Definition: winuser.h:3221
HCURSOR hCursor
Definition: winuser.h:3226
HINSTANCE hInstance
Definition: winuser.h:3224
BOOL WINAPI GetClassInfoExW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _Out_ LPWNDCLASSEXW)
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2157
ATOM WINAPI RegisterClassExW(_In_ CONST WNDCLASSEXW *)

Referenced by test_winclassinfo().

◆ AtlModuleRevokeClassObjects()

HRESULT WINAPI AtlModuleRevokeClassObjects ( _ATL_MODULEW pm)

Definition at line 278 of file atl30.c.

279{
280 FIXME("%p\n", pm);
281 return E_FAIL;
282}
#define E_FAIL
Definition: ddrawi.h:102

◆ AtlModuleTerm()

HRESULT WINAPI AtlModuleTerm ( _ATL_MODULE pM)

Definition at line 112 of file atl30.c.

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}
#define HeapFree(x, y, z)
Definition: compat.h:735
UINT cbSize
Definition: atlbase.h:192
_ATL_TERMFUNC_ELEM * m_pTermFuncs
Definition: atlbase.h:194
struct _ATL_TERMFUNC_ELEM_TAG * pNext
Definition: atlbase.h:119
_ATL_TERMFUNC * pFunc
Definition: atlbase.h:117

Referenced by test_term().

◆ AtlModuleUnregisterServer()

HRESULT WINAPI AtlModuleUnregisterServer ( _ATL_MODULEW pm,
const CLSID clsid 
)

Definition at line 287 of file atl30.c.

288{
289 FIXME("%p %s\n", pm, debugstr_guid(clsid));
290 return E_FAIL;
291}

◆ AtlModuleUnregisterServerEx()

HRESULT WINAPI AtlModuleUnregisterServerEx ( _ATL_MODULEW pM,
BOOL  bUnRegTypeLib,
const CLSID pCLSID 
)

Definition at line 171 of file atl30.c.

172{
173 FIXME("(%p, %i, %p) stub\n", pM, bUnRegTypeLib, pCLSID);
174 return S_OK;
175}

◆ AtlModuleUpdateRegistryFromResourceD()

HRESULT WINAPI AtlModuleUpdateRegistryFromResourceD ( _ATL_MODULEW pM,
LPCOLESTR  lpszRes,
BOOL  bRegister,
struct _ATL_REGMAP_ENTRY pMapEntries,
IRegistrar pReg 
)

Definition at line 453 of file atl30.c.

455{
456 TRACE("(%p %s %d %p %p)\n", pM, debugstr_w(lpszRes), bRegister, pMapEntries, pReg);
457
458 return AtlUpdateRegistryFromResourceD(pM->m_hInst, lpszRes, bRegister, pMapEntries, pReg);
459}
HRESULT WINAPI AtlUpdateRegistryFromResourceD(HINSTANCE inst, LPCOLESTR res, BOOL bRegister, struct _ATL_REGMAP_ENTRY *pMapEntries, IRegistrar *pReg)
Definition: registrar.c:706

◆ DllCanUnloadNow()

HRESULT WINAPI DllCanUnloadNow ( void  )

Definition at line 613 of file atl30.c.

614{
615 return S_FALSE;
616}
#define S_FALSE
Definition: winerror.h:2357

◆ DllGetClassObject()

HRESULT WINAPI DllGetClassObject ( REFCLSID  clsid,
REFIID  riid,
LPVOID ppvObject 
)

Definition at line 574 of file atl30.c.

575{
577
578 if(IsEqualGUID(&CLSID_Registrar, clsid))
579 return IClassFactory_QueryInterface( &RegistrarCF, riid, ppvObject );
580
581 FIXME("Not supported class %s\n", debugstr_guid(clsid));
583}
static IClassFactory RegistrarCF
Definition: atl30.c:520
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
Definition: wincrypt.h:6082

◆ DllRegisterServer()

HRESULT WINAPI DllRegisterServer ( void  )

Definition at line 588 of file atl30.c.

589{
590#ifdef __REACTOS__
591 /* Note: we can't use __wine_register_server here because it uses CLSID_Registrar which isn't registred yet */
592 return do_register_server(TRUE);
593#else
595#endif
596}
HINSTANCE atl_instance
Definition: atl.c:36
HRESULT __wine_register_resources(HMODULE module) DECLSPEC_HIDDEN
Definition: register.c:98

◆ DllUnregisterServer()

HRESULT WINAPI DllUnregisterServer ( void  )

Definition at line 601 of file atl30.c.

602{
603#ifdef __REACTOS__
604 return do_register_server(FALSE);
605#else
607#endif
608}
#define FALSE
Definition: types.h:117
HRESULT __wine_unregister_resources(HMODULE module) DECLSPEC_HIDDEN
Definition: register.c:110

◆ get_objmap_entry()

static _ATL_OBJMAP_ENTRYW_V1 * get_objmap_entry ( _ATL_MODULEW mod,
unsigned int  index 
)
static

Definition at line 88 of file atl30.c.

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}
std::map< E_MODULE, HMODULE > mod
Definition: LocaleTests.cpp:66
#define index(s, c)
Definition: various.h:29
GLuint index
Definition: glext.h:6031

Referenced by AtlModuleGetClassObject(), AtlModuleRegisterClassObjects(), and AtlModuleRegisterServer().

◆ RegistrarCF_AddRef()

static ULONG WINAPI RegistrarCF_AddRef ( IClassFactory iface)
static

Definition at line 474 of file atl30.c.

475{
476 return 2;
477}

◆ RegistrarCF_CreateInstance()

static HRESULT WINAPI RegistrarCF_CreateInstance ( IClassFactory iface,
LPUNKNOWN  pUnkOuter,
REFIID  riid,
void **  ppv 
)
static

Definition at line 484 of file atl30.c.

486{
487 IRegistrar *registrar;
489
490 TRACE("(%p)->(%s %p)\n", iface, debugstr_guid(riid), ppv);
491
492 if(pUnkOuter) {
493 *ppv = NULL;
495 }
496
497 hres = AtlCreateRegistrar(&registrar);
498 if(FAILED(hres))
499 return hres;
500
501 hres = IRegistrar_QueryInterface(registrar, riid, ppv);
502 IRegistrar_Release(registrar);
503 return hres;
504}
HRESULT WINAPI AtlCreateRegistrar(IRegistrar **ret)
Definition: registrar.c:687
#define CLASS_E_NOAGGREGATION
Definition: winerror.h:2662

◆ RegistrarCF_LockServer()

static HRESULT WINAPI RegistrarCF_LockServer ( IClassFactory iface,
BOOL  lock 
)
static

Definition at line 506 of file atl30.c.

507{
508 TRACE("(%p)->(%x)\n", iface, lock);
509 return S_OK;
510}
rwlock_t lock
Definition: tcpcore.h:0

◆ RegistrarCF_QueryInterface()

static HRESULT WINAPI RegistrarCF_QueryInterface ( IClassFactory iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 461 of file atl30.c.

462{
463 TRACE("(%p)->(%s %p)\n", iface, debugstr_guid(riid), ppvObject);
464
466 *ppvObject = iface;
467 IClassFactory_AddRef( iface );
468 return S_OK;
469 }
470
471 return E_NOINTERFACE;
472}
const GUID IID_IClassFactory
#define E_NOINTERFACE
Definition: winerror.h:2364

◆ RegistrarCF_Release()

static ULONG WINAPI RegistrarCF_Release ( IClassFactory iface)
static

Definition at line 479 of file atl30.c.

480{
481 return 1;
482}

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( atl  )

Variable Documentation

◆ atl_instance

HINSTANCE atl_instance
extern

Definition at line 36 of file atl.c.

Referenced by DllMain(), DllRegisterServer(), and DllUnregisterServer().

◆ IRegistrarCFVtbl

const IClassFactoryVtbl IRegistrarCFVtbl
static
Initial value:
= {
}
static HRESULT WINAPI RegistrarCF_CreateInstance(IClassFactory *iface, LPUNKNOWN pUnkOuter, REFIID riid, void **ppv)
Definition: atl30.c:484
static ULONG WINAPI RegistrarCF_Release(IClassFactory *iface)
Definition: atl30.c:479
static ULONG WINAPI RegistrarCF_AddRef(IClassFactory *iface)
Definition: atl30.c:474
static HRESULT WINAPI RegistrarCF_LockServer(IClassFactory *iface, BOOL lock)
Definition: atl30.c:506
static HRESULT WINAPI RegistrarCF_QueryInterface(IClassFactory *iface, REFIID riid, void **ppvObject)
Definition: atl30.c:461

Definition at line 512 of file atl30.c.

◆ RegistrarCF

IClassFactory RegistrarCF = { &IRegistrarCFVtbl }
static

Definition at line 520 of file atl30.c.

Referenced by DllGetClassObject().