Commit 5a2c9de2 authored by Alexandre Julliard's avatar Alexandre Julliard

oleaut32: Register interfaces through dlldata.c as far as possible.

parent 16b5e6b9
......@@ -7,7 +7,7 @@ IMPORTLIB = oleaut32
IMPORTS = uuid ole32 rpcrt4 user32 gdi32 advapi32 kernel32 ntdll
DELAYIMPORTS = comctl32 urlmon
EXTRADEFS = -D_OLEAUT32_ -DCOM_NO_WINDOWS_H \
-DENTRY_PREFIX=OLEAUTPS_ -DPROXY_CLSID=CLSID_PSDispatch -DPROXY_DELEGATION
-DENTRY_PREFIX=OLEAUTPS_ -DPROXY_CLSID=CLSID_PSDispatch -DPROXY_DELEGATION -DREGISTER_PROXY_DLL
C_SRCS = \
connpt.c \
......
......@@ -41,8 +41,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(ole);
static BOOL BSTR_bCache = TRUE; /* Cache allocations to minimise alloc calls? */
HMODULE OLEAUT32_hModule = NULL;
/******************************************************************************
* BSTR {OLEAUT32}
*
......@@ -697,6 +695,7 @@ HRESULT WINAPI OleTranslateColor(
}
extern HRESULT WINAPI OLEAUTPS_DllGetClassObject(REFCLSID, REFIID, LPVOID *) DECLSPEC_HIDDEN;
extern BOOL WINAPI OLEAUTPS_DllMain(HINSTANCE, DWORD, LPVOID) DECLSPEC_HIDDEN;
extern void _get_STDFONT_CF(LPVOID *);
extern void _get_STDPIC_CF(LPVOID *);
......@@ -830,18 +829,7 @@ HRESULT WINAPI DllCanUnloadNow(void)
*/
BOOL WINAPI DllMain(HINSTANCE hInstDll, DWORD fdwReason, LPVOID lpvReserved)
{
TRACE("(%p,%d,%p)\n", hInstDll, fdwReason, lpvReserved);
switch (fdwReason) {
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hInstDll);
OLEAUT32_hModule = hInstDll;
break;
case DLL_PROCESS_DETACH:
break;
};
return TRUE;
return OLEAUTPS_DllMain( hInstDll, fdwReason, lpvReserved );
}
/***********************************************************************
......
......@@ -466,353 +466,62 @@ static struct regsvr_coclass const coclass_list[] = {
/***********************************************************************
* interface list
*/
#define INTERFACE_ENTRY(interface, clsid16, clsid32) { &IID_##interface, #interface, NULL, sizeof(interface##Vtbl)/sizeof(void*), clsid16, clsid32 }
#define LCL_INTERFACE_ENTRY(interface) INTERFACE_ENTRY(interface, NULL, NULL)
#define PSFAC_INTERFACE_ENTRY(interface) INTERFACE_ENTRY(interface, NULL, &CLSID_PSFactoryBuffer)
#define CLSID_INTERFACE_ENTRY(interface,clsid) INTERFACE_ENTRY(interface, clsid, clsid)
static struct regsvr_interface const interface_list[] = {
{ &IID_IDispatch,
"IDispatch",
NULL,
7,
&CLSID_PSDispatch,
&CLSID_PSDispatch
},
{ &IID_ITypeInfo,
"ITypeInfo",
NULL,
22,
&CLSID_PSTypeInfo,
&CLSID_PSTypeInfo
},
{ &IID_ITypeLib,
"ITypeLib",
NULL,
13,
&CLSID_PSTypeLib,
&CLSID_PSTypeLib
},
{ &IID_ITypeComp,
"ITypeComp",
NULL,
5,
&CLSID_PSTypeComp,
&CLSID_PSTypeComp
},
{ &IID_IEnumVARIANT,
"IEnumVARIANT",
NULL,
15,
&CLSID_PSEnumVariant,
&CLSID_PSEnumVariant
},
{ &IID_ICreateTypeInfo,
"ICreateTypeInfo",
NULL,
26,
NULL,
NULL
},
{ &IID_ICreateTypeLib,
"ICreateTypeLib",
NULL,
13,
NULL,
NULL
},
{ &IID_ITypeInfo2,
"ITypeInfo2",
NULL,
32,
NULL,
&CLSID_PSDispatch
},
{ &IID_ITypeLib2,
"ITypeLib2",
NULL,
16,
NULL,
&CLSID_PSDispatch
},
{ &IID_IPropertyPage2,
"IPropertyPage2",
NULL,
15,
NULL,
&CLSID_PSFactoryBuffer
},
{ &IID_IErrorInfo,
"IErrorInfo",
NULL,
8,
NULL,
&CLSID_PSFactoryBuffer
},
{ &IID_ICreateErrorInfo,
"ICreateErrorInfo",
NULL,
8,
NULL,
&CLSID_PSFactoryBuffer
},
{ &IID_IPersistPropertyBag2,
"IPersistPropertyBag2",
NULL,
8,
NULL,
&CLSID_PSFactoryBuffer
},
{ &IID_IPropertyBag2,
"IPropertyBag2",
NULL,
8,
NULL,
&CLSID_PSFactoryBuffer
},
{ &IID_IErrorLog,
"IErrorLog",
NULL,
4,
NULL,
&CLSID_PSFactoryBuffer
},
{ &IID_IPerPropertyBrowsing,
"IPerPropertyBrowsing",
NULL,
7,
NULL,
&CLSID_PSFactoryBuffer
},
{ &IID_IPersistPropertyBag,
"IPersistPropertyBag",
NULL,
7,
NULL,
&CLSID_PSFactoryBuffer
},
{ &IID_IAdviseSinkEx,
"IAdviseSinkEx",
NULL,
9,
NULL,
&CLSID_PSFactoryBuffer
},
{ &IID_IFontEventsDisp,
"FontEvents",
NULL,
7,
NULL,
&CLSID_PSDispatch
},
{ &IID_IPropertyBag,
"IPropertyBag",
NULL,
5,
NULL,
&CLSID_PSFactoryBuffer
},
{ &IID_IPointerInactive,
"IPointerInactive",
NULL,
6,
NULL,
&CLSID_PSFactoryBuffer
},
{ &IID_ISimpleFrameSite,
"ISimpleFrameSite",
NULL,
5,
NULL,
&CLSID_PSFactoryBuffer
},
{ &IID_IPicture,
"IPicture",
NULL,
17,
NULL,
&CLSID_PSFactoryBuffer
},
{ &IID_IPictureDisp,
"Picture",
NULL,
7,
NULL,
&CLSID_PSDispatch
},
{ &IID_IPersistStreamInit,
"IPersistStreamInit",
NULL,
9,
NULL,
&CLSID_PSFactoryBuffer
},
{ &IID_IOleUndoUnit,
"IOleUndoUnit",
NULL,
7,
NULL,
&CLSID_PSFactoryBuffer
},
{ &IID_IPropertyNotifySink,
"IPropertyNotifySink",
NULL,
5,
NULL,
&CLSID_PSFactoryBuffer
},
{ &IID_IOleInPlaceSiteEx,
"IOleInPlaceSiteEx",
NULL,
18,
NULL,
&CLSID_PSFactoryBuffer
},
{ &IID_IOleParentUndoUnit,
"IOleParentUndoUnit",
NULL,
12,
NULL,
&CLSID_PSFactoryBuffer
},
{ &IID_IProvideClassInfo2,
"IProvideClassInfo2",
NULL,
5,
NULL,
&CLSID_PSFactoryBuffer
},
{ &IID_IProvideMultipleClassInfo,
"IProvideMultipleClassInfo",
NULL,
7,
NULL,
&CLSID_PSFactoryBuffer
},
{ &IID_IProvideClassInfo,
"IProvideClassInfo",
NULL,
4,
NULL,
&CLSID_PSFactoryBuffer
},
{ &IID_IConnectionPointContainer,
"IConnectionPointContainer",
NULL,
5,
NULL,
&CLSID_PSFactoryBuffer
},
{ &IID_IEnumConnectionPoints,
"IEnumConnectionPoints",
NULL,
7,
NULL,
&CLSID_PSFactoryBuffer
},
{ &IID_IConnectionPoint,
"IConnectionPoint",
NULL,
8,
NULL,
&CLSID_PSFactoryBuffer
},
{ &IID_IEnumConnections,
"IEnumConnections",
NULL,
7,
NULL,
&CLSID_PSFactoryBuffer
},
{ &IID_IOleControl,
"IOleControl",
NULL,
7,
NULL,
&CLSID_PSFactoryBuffer
},
{ &IID_IOleControlSite,
"IOleControlSite",
NULL,
10,
NULL,
&CLSID_PSFactoryBuffer
},
{ &IID_ISpecifyPropertyPages,
"ISpecifyPropertyPages",
NULL,
4,
NULL,
&CLSID_PSFactoryBuffer
},
{ &IID_IPropertyPageSite,
"IPropertyPageSite",
NULL,
7,
NULL,
&CLSID_PSFactoryBuffer
},
{ &IID_IPropertyPage,
"IPropertyPage",
NULL,
14,
NULL,
&CLSID_PSFactoryBuffer
},
{ &IID_IClassFactory2,
"IClassFactory2",
NULL,
8,
NULL,
&CLSID_PSFactoryBuffer
},
{ &IID_IEnumOleUndoUnits,
"IEnumOleUndoUnits",
NULL,
7,
NULL,
&CLSID_PSFactoryBuffer
},
{ &IID_IPersistMemory,
"IPersistMemory",
NULL,
9,
NULL,
&CLSID_PSFactoryBuffer
},
{ &IID_IFont,
"IFont",
NULL,
27,
NULL,
&CLSID_PSFactoryBuffer
},
{ &IID_IFontDisp,
"Font",
NULL,
7,
NULL,
&CLSID_PSDispatch
},
{ &IID_IQuickActivate,
"IQuickActivate",
NULL,
6,
NULL,
&CLSID_PSFactoryBuffer
},
{ &IID_IOleUndoManager,
"IOleUndoManager",
NULL,
15,
NULL,
&CLSID_PSFactoryBuffer
},
{ &IID_IObjectWithSite,
"IObjectWithSite",
NULL,
5,
NULL,
&CLSID_PSFactoryBuffer
},
LCL_INTERFACE_ENTRY(ICreateTypeInfo),
LCL_INTERFACE_ENTRY(ICreateTypeLib),
CLSID_INTERFACE_ENTRY(IDispatch,&CLSID_PSDispatch),
CLSID_INTERFACE_ENTRY(IEnumVARIANT,&CLSID_PSEnumVariant),
CLSID_INTERFACE_ENTRY(ITypeComp,&CLSID_PSTypeComp),
CLSID_INTERFACE_ENTRY(ITypeInfo,&CLSID_PSTypeInfo),
CLSID_INTERFACE_ENTRY(ITypeLib,&CLSID_PSTypeLib),
PSFAC_INTERFACE_ENTRY(IAdviseSinkEx),
PSFAC_INTERFACE_ENTRY(IClassFactory2),
PSFAC_INTERFACE_ENTRY(IConnectionPoint),
PSFAC_INTERFACE_ENTRY(IConnectionPointContainer),
PSFAC_INTERFACE_ENTRY(ICreateErrorInfo),
PSFAC_INTERFACE_ENTRY(IEnumConnectionPoints),
PSFAC_INTERFACE_ENTRY(IEnumConnections),
PSFAC_INTERFACE_ENTRY(IEnumOleUndoUnits),
PSFAC_INTERFACE_ENTRY(IErrorInfo),
PSFAC_INTERFACE_ENTRY(IErrorLog),
PSFAC_INTERFACE_ENTRY(IFont),
PSFAC_INTERFACE_ENTRY(IObjectWithSite),
PSFAC_INTERFACE_ENTRY(IOleControl),
PSFAC_INTERFACE_ENTRY(IOleControlSite),
PSFAC_INTERFACE_ENTRY(IOleInPlaceSiteEx),
PSFAC_INTERFACE_ENTRY(IOleParentUndoUnit),
PSFAC_INTERFACE_ENTRY(IOleUndoManager),
PSFAC_INTERFACE_ENTRY(IOleUndoUnit),
PSFAC_INTERFACE_ENTRY(IPerPropertyBrowsing),
PSFAC_INTERFACE_ENTRY(IPersistMemory),
PSFAC_INTERFACE_ENTRY(IPersistPropertyBag),
PSFAC_INTERFACE_ENTRY(IPersistPropertyBag2),
PSFAC_INTERFACE_ENTRY(IPersistStreamInit),
PSFAC_INTERFACE_ENTRY(IPicture),
PSFAC_INTERFACE_ENTRY(IPointerInactive),
PSFAC_INTERFACE_ENTRY(IPropertyBag),
PSFAC_INTERFACE_ENTRY(IPropertyBag2),
PSFAC_INTERFACE_ENTRY(IPropertyNotifySink),
PSFAC_INTERFACE_ENTRY(IPropertyPage),
PSFAC_INTERFACE_ENTRY(IPropertyPage2),
PSFAC_INTERFACE_ENTRY(IPropertyPageSite),
PSFAC_INTERFACE_ENTRY(IProvideClassInfo),
PSFAC_INTERFACE_ENTRY(IProvideClassInfo2),
PSFAC_INTERFACE_ENTRY(IProvideMultipleClassInfo),
PSFAC_INTERFACE_ENTRY(IQuickActivate),
PSFAC_INTERFACE_ENTRY(ISimpleFrameSite),
PSFAC_INTERFACE_ENTRY(ISpecifyPropertyPages),
{ NULL } /* list terminator */
};
extern HRESULT WINAPI OLEAUTPS_DllRegisterServer(void) DECLSPEC_HIDDEN;
extern HRESULT WINAPI OLEAUTPS_DllUnregisterServer(void) DECLSPEC_HIDDEN;
/***********************************************************************
* DllRegisterServer (OLEAUT32.@)
*/
......@@ -822,7 +531,9 @@ HRESULT WINAPI DllRegisterServer(void)
TRACE("\n");
hr = register_coclasses(coclass_list);
hr = OLEAUTPS_DllRegisterServer();
if (SUCCEEDED(hr))
hr = register_coclasses(coclass_list);
if (SUCCEEDED(hr))
hr = register_interfaces(interface_list);
return hr;
......@@ -840,5 +551,7 @@ HRESULT WINAPI DllUnregisterServer(void)
hr = unregister_coclasses(coclass_list);
if (SUCCEEDED(hr))
hr = unregister_interfaces(interface_list);
if (SUCCEEDED(hr))
hr = OLEAUTPS_DllUnregisterServer();
return hr;
}
......@@ -32,7 +32,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(variant);
extern HMODULE OLEAUT32_hModule;
extern HMODULE hProxyDll DECLSPEC_HIDDEN;
#define CY_MULTIPLIER 10000 /* 4 dp of precision */
#define CY_MULTIPLIER_F 10000.0
......@@ -5949,11 +5949,11 @@ static BOOL VARIANT_GetLocalisedText(LANGID langId, DWORD dwId, WCHAR *lpszDest)
{
HRSRC hrsrc;
hrsrc = FindResourceExW( OLEAUT32_hModule, (LPWSTR)RT_STRING,
hrsrc = FindResourceExW( hProxyDll, (LPWSTR)RT_STRING,
MAKEINTRESOURCEW((dwId >> 4) + 1), langId );
if (hrsrc)
{
HGLOBAL hmem = LoadResource( OLEAUT32_hModule, hrsrc );
HGLOBAL hmem = LoadResource( hProxyDll, hrsrc );
if (hmem)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment