ole32: Make compobj.dll into a stand-alone 16-bit module.

This commit is contained in:
Alexandre Julliard 2009-03-11 17:12:32 +01:00
parent 2e1b309fba
commit 6b40f64e18
9 changed files with 103 additions and 59 deletions

1
.gitignore vendored
View File

@ -27,7 +27,6 @@ dlls/advapi32/svcctl_c.c
dlls/atl/atliface.h
dlls/avifile.dll16
dlls/commdlg.dll16
dlls/compobj.dll16
dlls/ctl3d.dll16
dlls/ctl3dv2.dll16
dlls/ddeml.dll16

10
configure vendored
View File

@ -3902,6 +3902,7 @@ then
WIN16_FILES=""
WIN16_INSTALL=""
enable_comm_drv16=${enable_comm_drv16:-no}
enable_compobj_dll16=${enable_compobj_dll16:-no}
enable_dispdib_dll16=${enable_dispdib_dll16:-no}
enable_display_drv16=${enable_display_drv16:-no}
enable_ifsmgr_vxd=${enable_ifsmgr_vxd:-no}
@ -24768,6 +24769,14 @@ ALL_MAKEFILE_DEPENDS="$ALL_MAKEFILE_DEPENDS
dlls/comm.drv16/Makefile: dlls/comm.drv16/Makefile.in dlls/Makedll.rules"
ac_config_files="$ac_config_files dlls/comm.drv16/Makefile"
ALL_MAKEFILES="$ALL_MAKEFILES \\
dlls/compobj.dll16/Makefile"
test "x$enable_compobj_dll16" != xno && ALL_DLL_DIRS="$ALL_DLL_DIRS \\
compobj.dll16"
ALL_MAKEFILE_DEPENDS="$ALL_MAKEFILE_DEPENDS
dlls/compobj.dll16/Makefile: dlls/compobj.dll16/Makefile.in dlls/Makedll.rules"
ac_config_files="$ac_config_files dlls/compobj.dll16/Makefile"
ALL_MAKEFILES="$ALL_MAKEFILES \\
dlls/compstui/Makefile"
test "x$enable_compstui" != xno && ALL_DLL_DIRS="$ALL_DLL_DIRS \\
@ -29021,6 +29030,7 @@ do
"dlls/comdlg32/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/comdlg32/Makefile" ;;
"dlls/comdlg32/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/comdlg32/tests/Makefile" ;;
"dlls/comm.drv16/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/comm.drv16/Makefile" ;;
"dlls/compobj.dll16/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/compobj.dll16/Makefile" ;;
"dlls/compstui/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/compstui/Makefile" ;;
"dlls/credui/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/credui/Makefile" ;;
"dlls/credui/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/credui/tests/Makefile" ;;

View File

@ -139,6 +139,7 @@ then
WIN16_FILES=""
WIN16_INSTALL=""
enable_comm_drv16=${enable_comm_drv16:-no}
enable_compobj_dll16=${enable_compobj_dll16:-no}
enable_dispdib_dll16=${enable_dispdib_dll16:-no}
enable_display_drv16=${enable_display_drv16:-no}
enable_ifsmgr_vxd=${enable_ifsmgr_vxd:-no}
@ -1934,6 +1935,7 @@ WINE_CONFIG_MAKEFILE([dlls/comctl32/tests/Makefile],[dlls/Maketest.rules],[dlls]
WINE_CONFIG_MAKEFILE([dlls/comdlg32/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
WINE_CONFIG_MAKEFILE([dlls/comdlg32/tests/Makefile],[dlls/Maketest.rules],[dlls],[ALL_TEST_DIRS],[enable_tests])
WINE_CONFIG_MAKEFILE([dlls/comm.drv16/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
WINE_CONFIG_MAKEFILE([dlls/compobj.dll16/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
WINE_CONFIG_MAKEFILE([dlls/compstui/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
WINE_CONFIG_MAKEFILE([dlls/credui/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
WINE_CONFIG_MAKEFILE([dlls/credui/tests/Makefile],[dlls/Maketest.rules],[dlls],[ALL_TEST_DIRS],[enable_tests])

View File

@ -20,7 +20,6 @@ DOCSUBDIRS = $(DLLSUBDIRS)
WIN16_FILES = \
avifile.dll16 \
commdlg.dll16 \
compobj.dll16 \
ctl3d.dll16 \
ctl3dv2.dll16 \
ddeml.dll16 \
@ -79,9 +78,6 @@ krnl386.exe16 system.drv16 toolhelp.dll16:
msvideo.dll16:
echo "msvfw32.dll" >$@
compobj.dll16:
echo "ole32.dll" >$@
ole2disp.dll16 typelib.dll16:
echo "oleaut32.dll" >$@

View File

@ -0,0 +1,15 @@
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = compobj.dll16
IMPORTS = uuid ole32 advapi32 kernel32
EXTRADLLFLAGS = -Wb,--subsystem,win16,--main-module,ole32.dll
SPEC_SRCS = compobj.dll16.spec
C_SRCS = compobj.c
@MAKE_DLL_RULES@
@DEPENDENCIES@ # everything below this line is overwritten by make depend

View File

@ -42,7 +42,6 @@
#include "wtypes.h"
#include "wine/unicode.h"
#include "wine/winbase16.h"
#include "compobj_private.h"
#include "wine/debug.h"
@ -231,6 +230,14 @@ IMalloc16_Constructor(void)
}
/******************************************************************************
* CoBuildVersion [COMPOBJ.1]
*/
DWORD WINAPI CoBuildVersion16(void)
{
return CoBuildVersion();
}
/***********************************************************************
* CoGetMalloc [COMPOBJ.4]
*
@ -284,6 +291,14 @@ void WINAPI CoUninitialize16(void)
CoFreeAllLibraries();
}
/***********************************************************************
* CoFreeUnusedLibraries [COMPOBJ.17]
*/
void WINAPI CoFreeUnusedLibraries16(void)
{
return CoFreeUnusedLibraries();
}
/***********************************************************************
* IsEqualGUID [COMPOBJ.18]
*
@ -417,15 +432,17 @@ _xmalloc16(DWORD size, SEGPTR *ptr) {
HRESULT WINAPI StringFromCLSID16(
REFCLSID id, /* [in] the GUID to be converted */
LPOLESTR16 *idstr /* [out] a pointer to a to-be-allocated segmented pointer pointing to the resulting string */
) {
LPOLESTR16 *idstr ) /* [out] a pointer to a to-be-allocated segmented pointer pointing to the resulting string */
{
WCHAR buffer[40];
HRESULT ret;
ret = _xmalloc16(40,(SEGPTR*)idstr);
if (ret != S_OK)
return ret;
return WINE_StringFromCLSID(id,MapSL((SEGPTR)*idstr));
StringFromGUID2( id, buffer, 40 );
WideCharToMultiByte( CP_ACP, 0, buffer, -1, MapSL((SEGPTR)*idstr), 40, NULL, NULL );
return ret;
}
/******************************************************************************
@ -439,36 +456,20 @@ HRESULT WINAPI StringFromCLSID16(
*/
HRESULT WINAPI ProgIDFromCLSID16(
REFCLSID clsid, /* [in] class id as found in registry */
LPOLESTR16 *lplpszProgID/* [out] associated Program ID */
) {
static const WCHAR wszProgID[] = {'P','r','o','g','I','D',0};
HKEY hkey;
LPOLESTR16 *lplpszProgID )/* [out] associated Program ID */
{
LPOLESTR progid;
HRESULT ret;
LONG len;
char *buffer;
ret = COM_OpenKeyForCLSID(clsid, wszProgID, KEY_READ, &hkey);
if (FAILED(ret))
return ret;
if (RegQueryValueA(hkey, NULL, NULL, &len))
ret = REGDB_E_READREGDB;
if (ret == S_OK)
{
buffer = HeapAlloc(GetProcessHeap(), 0, len);
if (RegQueryValueA(hkey, NULL, buffer, &len))
ret = REGDB_E_READREGDB;
ret = ProgIDFromCLSID( clsid, &progid );
if (ret == S_OK)
{
INT len = WideCharToMultiByte( CP_ACP, 0, progid, -1, NULL, 0, NULL, NULL );
ret = _xmalloc16(len, (SEGPTR*)lplpszProgID);
if (ret == S_OK)
strcpy(MapSL((SEGPTR)*lplpszProgID),buffer);
WideCharToMultiByte( CP_ACP, 0, progid, -1, MapSL((SEGPTR)*lplpszProgID), len, NULL, NULL );
CoTaskMemFree( progid );
}
HeapFree(GetProcessHeap(), 0, buffer);
}
RegCloseKey(hkey);
return ret;
}
@ -570,6 +571,14 @@ BOOL16 WINAPI CoDosDateTimeToFileTime16(WORD wDosDate, WORD wDosTime, FILETIME *
return DosDateTimeToFileTime(wDosDate, wDosTime, ft);
}
/******************************************************************************
* CoGetCurrentProcess [COMPOBJ.34]
*/
DWORD WINAPI CoGetCurrentProcess16(void)
{
return CoGetCurrentProcess();
}
/******************************************************************************
* CoRegisterMessageFilter [COMPOBJ.27]
*/
@ -668,6 +677,23 @@ HRESULT WINAPI CLSIDFromProgID16(LPCOLESTR16 progid, LPCLSID riid)
return CLSIDFromString16(buf2,riid);
}
/******************************************************************************
* StringFromGUID2 [COMPOBJ.76]
*/
INT WINAPI StringFromGUID216(REFGUID id, LPOLESTR str, INT cmax)
{
return StringFromGUID2( id, str, cmax );
}
/***********************************************************************
* CoFileTimeNow [COMPOBJ.82]
*/
HRESULT WINAPI CoFileTimeNow16( FILETIME *lpFileTime )
{
return CoFileTimeNow( lpFileTime );
}
/***********************************************************************
* CoGetClassObject [COMPOBJ.7]
*
@ -685,6 +711,14 @@ HRESULT WINAPI CoGetClassObject16(
return E_NOTIMPL;
}
/******************************************************************************
* CoCreateGuid [COMPOBJ.73]
*/
HRESULT WINAPI CoCreateGuid16(GUID *pguid)
{
return CoCreateGuid( pguid );
}
/***********************************************************************
* CoCreateInstance [COMPOBJ.13]
*/

View File

@ -1,4 +1,4 @@
1 pascal CoBuildVersion() CoBuildVersion
1 pascal CoBuildVersion() CoBuildVersion16
2 pascal CoInitialize(long) CoInitialize16
3 pascal CoUninitialize() CoUninitialize16
4 pascal CoGetMalloc(long ptr) CoGetMalloc16
@ -14,7 +14,7 @@
14 stub STRINGFROMIID
15 pascal CoDisconnectObject(ptr long) CoDisconnectObject16
16 stub CORELEASEMARSHALDATA
17 pascal -ret16 CoFreeUnusedLibraries() CoFreeUnusedLibraries
17 pascal -ret16 CoFreeUnusedLibraries() CoFreeUnusedLibraries16
18 pascal -ret16 IsEqualGUID(ptr ptr) IsEqualGUID16
19 pascal StringFromCLSID(ptr ptr) StringFromCLSID16
20 pascal CLSIDFromString(str ptr) CLSIDFromString16
@ -31,7 +31,7 @@
31 pascal -ret16 CoDosDateTimeToFileTime(word word ptr) CoDosDateTimeToFileTime16
32 stub COMARSHALHRESULT
33 stub COUNMARSHALHRESULT
34 pascal CoGetCurrentProcess() CoGetCurrentProcess
34 pascal CoGetCurrentProcess() CoGetCurrentProcess16
35 stub SHRCREATE
36 stub COISOLE1CLASS
37 stub _GUID_NULL
@ -70,15 +70,15 @@
70 stub _IID_ISTDMARSHALINFO
71 pascal CoCreateStandardMalloc(long ptr) CoCreateStandardMalloc16
72 stub _IID_IEXTERNALCONNECTION
73 pascal CoCreateGuid(ptr) CoCreateGuid
73 pascal CoCreateGuid(ptr) CoCreateGuid16
75 stub FNASSERT
76 pascal StringFromGUID2(ptr ptr word) StringFromGUID2
76 pascal StringFromGUID2(ptr ptr word) StringFromGUID216
77 stub COGETCLASSEXT
78 stub OLE1CLASSFROMCLSID2
79 stub CLSIDFROMOLE1CLASS
80 stub COOPENCLASSKEY
81 stub GUIDFROMSTRING
82 pascal CoFileTimeNow(ptr) CoFileTimeNow
82 pascal CoFileTimeNow(ptr) CoFileTimeNow16
83 stub REMALLOCOID
84 stub REMFREEOID
85 stub REMCREATEREMOTEHANDLER

View File

@ -46,12 +46,6 @@ C_SRCS = \
stubmanager.c \
usrmarshal.c
C_SRCS16 = \
ole16.c
SPEC_SRCS16 = \
compobj.spec
RC_SRCS = ole32res.rc
IDL_C_SRCS = \

View File

@ -999,7 +999,6 @@ static void COMPOBJ_DllList_Free(void)
/******************************************************************************
* CoBuildVersion [OLE32.@]
* CoBuildVersion [COMPOBJ.1]
*
* Gets the build version of the DLL.
*
@ -1318,7 +1317,6 @@ HRESULT WINAPI CoDisconnectObject( LPUNKNOWN lpUnk, DWORD reserved )
/******************************************************************************
* CoCreateGuid [OLE32.@]
* CoCreateGuid [COMPOBJ.73]
*
* Simply forwards to UuidCreate in RPCRT4.
*
@ -1504,7 +1502,6 @@ HRESULT WINAPI StringFromCLSID(REFCLSID id, LPOLESTR *idstr)
/******************************************************************************
* StringFromGUID2 [OLE32.@]
* StringFromGUID2 [COMPOBJ.76]
*
* Modified version of StringFromCLSID that allows you to specify max
* buffer size.
@ -2684,7 +2681,6 @@ void WINAPI CoFreeUnusedLibrariesEx(DWORD dwUnloadDelay, DWORD dwReserved)
/***********************************************************************
* CoFreeUnusedLibraries [OLE32.@]
* CoFreeUnusedLibraries [COMPOBJ.17]
*
* Frees any unused libraries. Unused are identified as those that return
* S_OK from their DllCanUnloadNow function.
@ -2702,7 +2698,6 @@ void WINAPI CoFreeUnusedLibraries(void)
/***********************************************************************
* CoFileTimeNow [OLE32.@]
* CoFileTimeNow [COMPOBJ.82]
*
* Retrieves the current time in FILETIME format.
*
@ -2980,7 +2975,6 @@ done:
/******************************************************************************
* CoGetCurrentProcess [OLE32.@]
* CoGetCurrentProcess [COMPOBJ.34]
*
* Gets the current process ID.
*