atl: Share sources with atl100 instead of forwarding calls.

This commit is contained in:
Jacek Caban 2014-02-13 16:00:27 +01:00 committed by Alexandre Julliard
parent 383cacea8f
commit f285b06738
5 changed files with 44 additions and 70 deletions

View File

@ -1,11 +1,13 @@
MODULE = atl.dll
IMPORTLIB = atl
IMPORTS = uuid atl80 atl100 oleaut32 ole32 user32
IMPORTS = uuid atl80 oleaut32 ole32 user32 gdi32 advapi32
EXTRADEFS = -D_ATL_VER=_ATL_VER_30
PARENTSRC = ../atl100
C_SRCS = \
atl.c \
atl_ax.c \
atl_main.c
atl_main.c \
registrar.c
IDL_SRCS = atl_classes.idl

View File

@ -2,11 +2,11 @@
2 stdcall -private DllGetClassObject(ptr ptr ptr)
3 stdcall -private DllRegisterServer()
4 stdcall -private DllUnregisterServer()
10 stdcall AtlAdvise(ptr ptr ptr ptr) atl100.AtlAdvise
11 stdcall AtlUnadvise(ptr ptr long) atl100.AtlUnadvise
12 stdcall AtlFreeMarshalStream(ptr) atl100.AtlFreeMarshalStream
13 stdcall AtlMarshalPtrInProc(ptr ptr ptr) atl100.AtlMarshalPtrInProc
14 stdcall AtlUnmarshalPtr(ptr ptr ptr) atl100.AtlUnmarshalPtr
10 stdcall AtlAdvise(ptr ptr ptr ptr)
11 stdcall AtlUnadvise(ptr ptr long)
12 stdcall AtlFreeMarshalStream(ptr)
13 stdcall AtlMarshalPtrInProc(ptr ptr ptr)
14 stdcall AtlUnmarshalPtr(ptr ptr ptr)
15 stdcall AtlModuleGetClassObject(ptr ptr ptr ptr)
16 stdcall AtlModuleInit(ptr long long)
17 stdcall AtlModuleRegisterClassObjects(ptr long long)
@ -16,15 +16,15 @@
21 stdcall AtlModuleTerm(ptr)
22 stdcall AtlModuleUnregisterServer(ptr ptr)
23 stdcall AtlModuleUpdateRegistryFromResourceD(ptr wstr long ptr ptr)
24 stdcall AtlWaitWithMessageLoop(long) atl100.AtlWaitWithMessageLoop
24 stdcall AtlWaitWithMessageLoop(long)
25 stub AtlSetErrorInfo
26 stdcall AtlCreateTargetDC(long ptr) atl100.AtlCreateTargetDC
27 stdcall AtlHiMetricToPixel(ptr ptr) atl100.AtlHiMetricToPixel
28 stdcall AtlPixelToHiMetric(ptr ptr) atl100.AtlPixelToHiMetric
26 stdcall AtlCreateTargetDC(long ptr)
27 stdcall AtlHiMetricToPixel(ptr ptr)
28 stdcall AtlPixelToHiMetric(ptr ptr)
29 stub AtlDevModeW2A
30 stdcall AtlComPtrAssign(ptr ptr) atl100.AtlComPtrAssign
31 stdcall AtlComQIPtrAssign(ptr ptr ptr) atl100.AtlComQIPtrAssign
32 stdcall AtlInternalQueryInterface(ptr ptr ptr ptr) atl100.AtlInternalQueryInterface
30 stdcall AtlComPtrAssign(ptr ptr)
31 stdcall AtlComQIPtrAssign(ptr ptr ptr)
32 stdcall AtlInternalQueryInterface(ptr ptr ptr ptr)
34 stdcall AtlGetVersion(ptr)
35 stdcall AtlAxDialogBoxW(long wstr long ptr long)
36 stdcall AtlAxDialogBoxA(long str long ptr long)
@ -40,12 +40,12 @@
46 stdcall AtlModuleRegisterWndClassInfoA(ptr ptr ptr)
47 stdcall AtlAxGetControl(long ptr)
48 stdcall AtlAxGetHost(long ptr)
49 stdcall AtlRegisterClassCategoriesHelper(ptr ptr long) atl100.AtlRegisterClassCategoriesHelper
50 stdcall AtlIPersistStreamInit_Load(ptr ptr ptr ptr) atl100.AtlIPersistStreamInit_Load
51 stdcall AtlIPersistStreamInit_Save(ptr long ptr ptr ptr) atl100.AtlIPersistStreamInit_Save
52 stdcall AtlIPersistPropertyBag_Load(ptr ptr ptr ptr ptr) atl100.AtlIPersistPropertyBag_Load
49 stdcall AtlRegisterClassCategoriesHelper(ptr ptr long)
50 stdcall AtlIPersistStreamInit_Load(ptr ptr ptr ptr)
51 stdcall AtlIPersistStreamInit_Save(ptr long ptr ptr ptr)
52 stdcall AtlIPersistPropertyBag_Load(ptr ptr ptr ptr ptr)
53 stub AtlIPersistPropertyBag_Save
54 stdcall AtlGetObjectSourceInterface(ptr ptr ptr ptr ptr) atl100.AtlGetObjectSourceInterface
54 stdcall AtlGetObjectSourceInterface(ptr ptr ptr ptr ptr)
55 stub AtlModuleUnRegisterTypeLib
56 stdcall AtlModuleLoadTypeLib(ptr wstr ptr ptr)
57 stdcall AtlModuleUnregisterServerEx(ptr long ptr)

View File

@ -33,18 +33,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(atl);
static HINSTANCE hInst;
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
TRACE("(0x%p, %d, %p)\n",hinstDLL,fdwReason,lpvReserved);
if (fdwReason == DLL_PROCESS_ATTACH) {
DisableThreadLibraryCalls(hinstDLL);
hInst = hinstDLL;
}
return TRUE;
}
extern HINSTANCE atl_instance;
#define ATLVer1Size FIELD_OFFSET(_ATL_MODULEW, dwAtlBuildVer)
@ -142,25 +131,6 @@ HRESULT WINAPI AtlModuleTerm(_ATL_MODULE *pM)
return S_OK;
}
HRESULT WINAPI AtlModuleAddTermFunc(_ATL_MODULEW *pM, _ATL_TERMFUNC *pFunc, DWORD_PTR dw)
{
_ATL_TERMFUNC_ELEM *termfunc_elem;
TRACE("version %04x (%p %p %ld)\n", _ATL_VER, pM, pFunc, dw);
if (pM->cbSize > ATLVer1Size)
{
termfunc_elem = HeapAlloc(GetProcessHeap(), 0, sizeof(_ATL_TERMFUNC_ELEM));
termfunc_elem->pFunc = pFunc;
termfunc_elem->dw = dw;
termfunc_elem->pNext = pM->m_pTermFuncs;
pM->m_pTermFuncs = termfunc_elem;
}
return S_OK;
}
HRESULT WINAPI AtlModuleRegisterClassObjects(_ATL_MODULEW *pM, DWORD dwClsContext,
DWORD dwFlags)
{
@ -566,7 +536,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID riid, LPVOID *ppvObject)
*/
HRESULT WINAPI DllRegisterServer(void)
{
return __wine_register_resources( hInst );
return __wine_register_resources( atl_instance );
}
/***********************************************************************
@ -574,7 +544,7 @@ HRESULT WINAPI DllRegisterServer(void)
*/
HRESULT WINAPI DllUnregisterServer(void)
{
return __wine_unregister_resources( hInst );
return __wine_unregister_resources( atl_instance );
}
/***********************************************************************
@ -584,12 +554,3 @@ HRESULT WINAPI DllCanUnloadNow(void)
{
return S_FALSE;
}
/***********************************************************************
* AtlGetVersion [ATL.@]
*/
DWORD WINAPI AtlGetVersion(void *pReserved)
{
TRACE("version %04x (%p)\n", _ATL_VER, pReserved);
return _ATL_VER;
}

View File

@ -26,6 +26,10 @@
WINE_DEFAULT_DEBUG_CHANNEL(atl);
#define ATLVer1Size FIELD_OFFSET(_ATL_MODULEW, dwAtlBuildVer)
HINSTANCE atl_instance;
typedef unsigned char cpp_bool;
static inline void *heap_alloc(size_t len)
@ -301,16 +305,20 @@ HRESULT WINAPI AtlModuleAddTermFunc(_ATL_MODULE *pM, _ATL_TERMFUNC *pFunc, DWORD
TRACE("version %04x (%p %p %ld)\n", _ATL_VER, pM, pFunc, dw);
termfunc_elem = HeapAlloc(GetProcessHeap(), 0, sizeof(_ATL_TERMFUNC_ELEM));
termfunc_elem->pFunc = pFunc;
termfunc_elem->dw = dw;
termfunc_elem->pNext = pM->m_pTermFuncs;
if (_ATL_VER > _ATL_VER_30 || pM->cbSize > ATLVer1Size) {
termfunc_elem = HeapAlloc(GetProcessHeap(), 0, sizeof(_ATL_TERMFUNC_ELEM));
termfunc_elem->pFunc = pFunc;
termfunc_elem->dw = dw;
termfunc_elem->pNext = pM->m_pTermFuncs;
pM->m_pTermFuncs = termfunc_elem;
pM->m_pTermFuncs = termfunc_elem;
}
return S_OK;
}
#if _ATL_VER > _ATL_VER_30
/***********************************************************************
* AtlCallTermFunc [atl100.@]
*/
@ -330,6 +338,8 @@ void WINAPI AtlCallTermFunc(_ATL_MODULE *pM)
pM->m_pTermFuncs = NULL;
}
#endif
/***********************************************************************
* AtlLoadTypeLib [atl100.56]
*/
@ -386,6 +396,8 @@ HRESULT WINAPI AtlLoadTypeLib(HINSTANCE inst, LPCOLESTR lpszIndex,
return S_OK;
}
#if _ATL_VER > _ATL_VER_30
/***********************************************************************
* AtlWinModuleInit [atl100.65]
*/
@ -578,6 +590,8 @@ HRESULT WINAPI AtlComModuleUnregisterServer(_ATL_COM_MODULE *mod, BOOL bRegTypeL
return S_OK;
}
#endif
/***********************************************************************
* AtlRegisterClassCategoriesHelper [atl100.49]
*/
@ -819,6 +833,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
switch(fdwReason) {
case DLL_PROCESS_ATTACH:
atl_instance = hinstDLL;
DisableThreadLibraryCalls(hinstDLL);
break;
case DLL_PROCESS_DETACH:

View File

@ -118,10 +118,6 @@ my @dll_groups =
"vcomp100",
"vcomp90",
],
[
"atl100",
"atl",
],
[
"advapi32",
"api-ms-win-core-localregistry-l1-1-0",