Module: wine Branch: master Commit: 8a7089570d19a01417467b7921ec01186ad83286 URL: http://source.winehq.org/git/wine.git/?a=commit;h=8a7089570d19a01417467b7921...
Author: Alexandre Julliard julliard@winehq.org Date: Wed Mar 11 17:30:10 2009 +0100
oleaut32: Make typelib.dll into a stand-alone 16-bit module.
---
.gitignore | 1 - configure | 10 +++++++++ configure.ac | 2 + dlls/Makefile.in | 3 +- dlls/oleaut32/Makefile.in | 6 +--- dlls/oleaut32/hash.c | 1 - dlls/typelib.dll16/Makefile.in | 15 +++++++++++++ .../typelib16.c => typelib.dll16/typelib.c} | 22 +++++++++++++++---- .../typelib.dll16.spec} | 2 +- 9 files changed, 48 insertions(+), 14 deletions(-)
diff --git a/.gitignore b/.gitignore index cb01844..ac61c48 100644 --- a/.gitignore +++ b/.gitignore @@ -97,7 +97,6 @@ dlls/stdole32.tlb/std_ole_v1.tlb dlls/system.drv16 dlls/toolhelp.dll16 dlls/twain.dll16 -dlls/typelib.dll16 dlls/user.exe16 dlls/ver.dll16 dlls/w32sys.dll16 diff --git a/configure b/configure index c18840d..e9e3b50 100755 --- a/configure +++ b/configure @@ -3921,6 +3921,7 @@ then enable_olesvr_dll16=${enable_olesvr_dll16:-no} enable_storage_dll16=${enable_storage_dll16:-no} enable_stress_dll16=${enable_stress_dll16:-no} + enable_typelib_dll16=${enable_typelib_dll16:-no} enable_vdhcp_vxd=${enable_vdhcp_vxd:-no} enable_vmm_vxd=${enable_vmm_vxd:-no} enable_vnbt_vxd=${enable_vnbt_vxd:-no} @@ -27226,6 +27227,14 @@ dlls/twain_32/tests/Makefile: dlls/twain_32/tests/Makefile.in dlls/Maketest.rule ac_config_files="$ac_config_files dlls/twain_32/tests/Makefile"
ALL_MAKEFILES="$ALL_MAKEFILES \ + dlls/typelib.dll16/Makefile" +test "x$enable_typelib_dll16" != xno && ALL_DLL_DIRS="$ALL_DLL_DIRS \ + typelib.dll16" +ALL_MAKEFILE_DEPENDS="$ALL_MAKEFILE_DEPENDS +dlls/typelib.dll16/Makefile: dlls/typelib.dll16/Makefile.in dlls/Makedll.rules" +ac_config_files="$ac_config_files dlls/typelib.dll16/Makefile" + +ALL_MAKEFILES="$ALL_MAKEFILES \ dlls/unicows/Makefile" test "x$enable_unicows" != xno && ALL_DLL_DIRS="$ALL_DLL_DIRS \ unicows" @@ -29337,6 +29346,7 @@ do "dlls/traffic/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/traffic/Makefile" ;; "dlls/twain_32/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/twain_32/Makefile" ;; "dlls/twain_32/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/twain_32/tests/Makefile" ;; + "dlls/typelib.dll16/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/typelib.dll16/Makefile" ;; "dlls/unicows/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/unicows/Makefile" ;; "dlls/updspapi/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/updspapi/Makefile" ;; "dlls/url/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/url/Makefile" ;; diff --git a/configure.ac b/configure.ac index f4e34a9..56ee6ae 100644 --- a/configure.ac +++ b/configure.ac @@ -158,6 +158,7 @@ then enable_olesvr_dll16=${enable_olesvr_dll16:-no} enable_storage_dll16=${enable_storage_dll16:-no} enable_stress_dll16=${enable_stress_dll16:-no} + enable_typelib_dll16=${enable_typelib_dll16:-no} enable_vdhcp_vxd=${enable_vdhcp_vxd:-no} enable_vmm_vxd=${enable_vmm_vxd:-no} enable_vnbt_vxd=${enable_vnbt_vxd:-no} @@ -2242,6 +2243,7 @@ WINE_CONFIG_MAKEFILE([dlls/tapi32/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL WINE_CONFIG_MAKEFILE([dlls/traffic/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS]) WINE_CONFIG_MAKEFILE([dlls/twain_32/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS]) WINE_CONFIG_MAKEFILE([dlls/twain_32/tests/Makefile],[dlls/Maketest.rules],[dlls],[ALL_TEST_DIRS],[enable_tests]) +WINE_CONFIG_MAKEFILE([dlls/typelib.dll16/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS]) WINE_CONFIG_MAKEFILE([dlls/unicows/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS]) WINE_CONFIG_MAKEFILE([dlls/updspapi/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS]) WINE_CONFIG_MAKEFILE([dlls/url/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS]) diff --git a/dlls/Makefile.in b/dlls/Makefile.in index 27783be..f5cdd1e 100644 --- a/dlls/Makefile.in +++ b/dlls/Makefile.in @@ -36,7 +36,6 @@ WIN16_FILES = \ system.drv16 \ toolhelp.dll16 \ twain.dll16 \ - typelib.dll16 \ user.exe16 \ ver.dll16 \ w32sys.dll16 \ @@ -78,7 +77,7 @@ krnl386.exe16 system.drv16 toolhelp.dll16: msvideo.dll16: echo "msvfw32.dll" >$@
-ole2disp.dll16 typelib.dll16: +ole2disp.dll16: echo "oleaut32.dll" >$@
rasapi16.dll16: diff --git a/dlls/oleaut32/Makefile.in b/dlls/oleaut32/Makefile.in index 56b96be..4ea761d 100644 --- a/dlls/oleaut32/Makefile.in +++ b/dlls/oleaut32/Makefile.in @@ -30,12 +30,10 @@ C_SRCS = \ vartype.c
C_SRCS16 = \ - ole2disp.c \ - typelib16.c + ole2disp.c
SPEC_SRCS16 = \ - ole2disp.spec \ - typelib.spec + ole2disp.spec
RC_SRCS = oleaut32.rc
diff --git a/dlls/oleaut32/hash.c b/dlls/oleaut32/hash.c index 6f6eebb..a2710df 100644 --- a/dlls/oleaut32/hash.c +++ b/dlls/oleaut32/hash.c @@ -486,7 +486,6 @@ static const unsigned char Lookup_224[128 * 3] = {
/*********************************************************************** * LHashValOfNameSysA (OLEAUT32.166) - * LHashValOfNameSys (TYPELIB.4) * * Produce a string hash value. * diff --git a/dlls/typelib.dll16/Makefile.in b/dlls/typelib.dll16/Makefile.in new file mode 100644 index 0000000..d8d6c9a --- /dev/null +++ b/dlls/typelib.dll16/Makefile.in @@ -0,0 +1,15 @@ +TOPSRCDIR = @top_srcdir@ +TOPOBJDIR = ../.. +SRCDIR = @srcdir@ +VPATH = @srcdir@ +MODULE = typelib.dll16 +IMPORTS = oleaut32 advapi32 kernel32 +EXTRADLLFLAGS = -Wb,--subsystem,win16,--main-module,oleaut32.dll + +SPEC_SRCS = typelib.dll16.spec + +C_SRCS = typelib.c + +@MAKE_DLL_RULES@ + +@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/oleaut32/typelib16.c b/dlls/typelib.dll16/typelib.c similarity index 91% rename from dlls/oleaut32/typelib16.c rename to dlls/typelib.dll16/typelib.c index a7b2639..bf733ae 100644 --- a/dlls/oleaut32/typelib16.c +++ b/dlls/typelib.dll16/typelib.c @@ -33,11 +33,11 @@ #include "winerror.h" #include "windef.h" #include "winbase.h" +#include "wine/winbase16.h" #include "winreg.h" #include "winuser.h" - #include "objbase.h" -#include "ole2disp.h" +#include "oleauto.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(ole); @@ -75,13 +75,14 @@ QueryPathOfRegTypeLib16( WORD wMaj, /* [in] Major version */ WORD wMin, /* [in] Minor version */ LCID lcid, /* [in] Locale Id */ - LPBSTR16 path) /* [out] Destination for the registry key name */ + SEGPTR *path) /* [out] Destination for the registry key name */ { char xguid[80]; char typelibkey[100],pathname[260]; LONG plen; + char *ret;
- TRACE("\n"); + TRACE("\n");
if (HIWORD(guid)) { sprintf( typelibkey, "SOFTWARE\Classes\Typelib\{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\%d.%d\%x\win16", @@ -102,7 +103,10 @@ QueryPathOfRegTypeLib16( FIXME("key %s not found\n",typelibkey); return E_FAIL; } - *path = SysAllocString16(pathname); + ret = HeapAlloc( GetProcessHeap(), 0, strlen(pathname) + 1 ); + if (!ret) return E_FAIL; + strcpy( ret, pathname ); + *path = MapLS(ret); return S_OK; }
@@ -130,6 +134,14 @@ HRESULT WINAPI LoadTypeLib16( return E_FAIL; }
+/*********************************************************************** + * LHashValOfNameSys (TYPELIB.4) + */ +ULONG WINAPI LHashValOfNameSys16( SYSKIND skind, LCID lcid, LPCSTR lpStr) +{ + return LHashValOfNameSysA( skind, lcid, lpStr ); +} + /**************************************************************************** * OaBuildVersion (TYPELIB.15) * diff --git a/dlls/oleaut32/typelib.spec b/dlls/typelib.dll16/typelib.dll16.spec similarity index 85% rename from dlls/oleaut32/typelib.spec rename to dlls/typelib.dll16/typelib.dll16.spec index c994288..10f5d4c 100644 --- a/dlls/oleaut32/typelib.spec +++ b/dlls/typelib.dll16/typelib.dll16.spec @@ -1,6 +1,6 @@ 2 stub CREATETYPELIB 3 pascal LoadTypeLib(ptr ptr) LoadTypeLib16 -4 pascal LHashValOfNameSys(word long str) LHashValOfNameSysA +4 pascal LHashValOfNameSys(word long str) LHashValOfNameSys16 5 stub _IID_ICREATETYPEINFO 6 stub _IID_ICREATETYPELIB 7 stub _IID_ITYPECOMP