From c5eedd47f6bd10179b890888db0befd6fd281645 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Wed, 28 Jan 2004 21:27:51 +0000 Subject: [PATCH] Merge back commits from WineHQ svn path=/trunk/; revision=7903 --- reactos/lib/ole32/Makefile.in | 2 +- reactos/lib/ole32/compobj.c | 2 + reactos/lib/ole32/filemoniker.c | 10 --- reactos/lib/ole32/ifs.h | 4 ++ reactos/lib/ole32/itemmoniker.c | 11 ---- reactos/lib/ole32/ole2.c | 1 + reactos/lib/ole32/ole2.spec | 2 +- reactos/lib/ole32/ole2_16.c | 22 +++++++ reactos/lib/ole32/storage32.c | 8 ++- reactos/lib/ole32/winehq2ros.patch | 99 ++---------------------------- 10 files changed, 42 insertions(+), 119 deletions(-) diff --git a/reactos/lib/ole32/Makefile.in b/reactos/lib/ole32/Makefile.in index 7c8e145dade..88c379e45e9 100644 --- a/reactos/lib/ole32/Makefile.in +++ b/reactos/lib/ole32/Makefile.in @@ -6,7 +6,7 @@ VPATH = @srcdir@ MODULE = ole32.dll IMPORTS = advapi32 user32 gdi32 rpcrt4 kernel32 ntdll ALTNAMES = ole2.dll ole2nls.dll ole2conv.dll ole2prox.dll ole2thk.dll storage.dll compobj.dll -EXTRALIBS = $(LIBUUID) +EXTRALIBS = -luuid SPEC_SRCS16 = $(ALTNAMES:.dll=.spec) diff --git a/reactos/lib/ole32/compobj.c b/reactos/lib/ole32/compobj.c index 895d1feadfd..f21ce78e426 100644 --- a/reactos/lib/ole32/compobj.c +++ b/reactos/lib/ole32/compobj.c @@ -51,6 +51,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(ole); +typedef LPCSTR LPCOLESTR16; + /**************************************************************************** * This section defines variables internal to the COM module. * diff --git a/reactos/lib/ole32/filemoniker.c b/reactos/lib/ole32/filemoniker.c index e334c76fcf0..52d9a996972 100644 --- a/reactos/lib/ole32/filemoniker.c +++ b/reactos/lib/ole32/filemoniker.c @@ -1332,16 +1332,6 @@ HRESULT WINAPI FileMonikerROTDataImpl_GetComparaisonData(IROTData* iface, return E_NOTIMPL; } -/****************************************************************************** - * CreateFileMoniker (OLE2.28) - ******************************************************************************/ -HRESULT WINAPI CreateFileMoniker16(LPCOLESTR16 lpszPathName,LPMONIKER* ppmk) -{ - - FIXME("(%s,%p),stub!\n",lpszPathName,ppmk); - return E_NOTIMPL; -} - /****************************************************************************** * CreateFileMoniker (OLE32.@) ******************************************************************************/ diff --git a/reactos/lib/ole32/ifs.h b/reactos/lib/ole32/ifs.h index 0183b7c5480..eba7409a557 100644 --- a/reactos/lib/ole32/ifs.h +++ b/reactos/lib/ole32/ifs.h @@ -25,6 +25,10 @@ #include "winbase.h" #include "objbase.h" +typedef CHAR OLECHAR16; +typedef LPSTR LPOLESTR16; +typedef LPCSTR LPCOLESTR16; + /*********************************************************************** * IMalloc16 interface */ diff --git a/reactos/lib/ole32/itemmoniker.c b/reactos/lib/ole32/itemmoniker.c index c4818851d39..b426f712f13 100644 --- a/reactos/lib/ole32/itemmoniker.c +++ b/reactos/lib/ole32/itemmoniker.c @@ -957,17 +957,6 @@ HRESULT WINAPI ItemMonikerROTDataImpl_GetComparaisonData(IROTData* iface, return E_NOTIMPL; } -/****************************************************************************** - * CreateItemMoniker16 [OLE2.28] - ******************************************************************************/ -HRESULT WINAPI CreateItemMoniker16(LPCOLESTR16 lpszDelim,LPCOLESTR lpszItem,LPMONIKER* ppmk) -{ - - FIXME("(%s,%p),stub!\n",lpszDelim,ppmk); - *ppmk = NULL; - return E_NOTIMPL; -} - /****************************************************************************** * CreateItemMoniker [OLE32.@] ******************************************************************************/ diff --git a/reactos/lib/ole32/ole2.c b/reactos/lib/ole32/ole2.c index 2d82cb92709..9d26841c650 100644 --- a/reactos/lib/ole32/ole2.c +++ b/reactos/lib/ole32/ole2.c @@ -1441,6 +1441,7 @@ BOOL WINAPI IsAccelerator(HACCEL hAccel, int cAccelEntries, LPMSG lpMsg, WORD* l if (CopyAcceleratorTableW(hAccel, lpAccelTbl, cAccelEntries) != cAccelEntries) { WARN_(accel)("CopyAcceleratorTableW failed\n"); + HeapFree(GetProcessHeap(), 0, lpAccelTbl); return FALSE; } diff --git a/reactos/lib/ole32/ole2.spec b/reactos/lib/ole32/ole2.spec index a9be14bac30..e4c7ae48e27 100644 --- a/reactos/lib/ole32/ole2.spec +++ b/reactos/lib/ole32/ole2.spec @@ -24,7 +24,7 @@ 24 stub OLESAVETOSTREAM 25 stub OLELOADFROMSTREAM 26 stub CREATEBINDCTX -27 stub CREATEITEMMONIKER +27 pascal CreateItemMoniker(str str ptr) CreateItemMoniker16 28 pascal CreateFileMoniker(str ptr) CreateFileMoniker16 29 stub CREATEGENERICCOMPOSITE 30 pascal GetRunningObjectTable(long ptr) GetRunningObjectTable16 diff --git a/reactos/lib/ole32/ole2_16.c b/reactos/lib/ole32/ole2_16.c index 67cbd9758c9..67514ead801 100644 --- a/reactos/lib/ole32/ole2_16.c +++ b/reactos/lib/ole32/ole2_16.c @@ -46,6 +46,7 @@ #include "wine/wingdi16.h" #include "wine/winuser16.h" #include "ole32_main.h" +#include "ifs.h" #include "wine/debug.h" @@ -120,3 +121,24 @@ HGLOBAL16 WINAPI OleMetaFilePictFromIconAndLabel16( mf->hMF = CloseMetaFile16(HDC_16(hdc)); return hmf; } + + +/****************************************************************************** + * CreateItemMoniker (OLE2.27) + */ +HRESULT WINAPI CreateItemMoniker16(LPCOLESTR16 lpszDelim,LPCOLESTR16 lpszItem,LPMONIKER* ppmk) +{ + FIXME("(%s,%p),stub!\n",lpszDelim,ppmk); + *ppmk = NULL; + return E_NOTIMPL; +} + + +/****************************************************************************** + * CreateFileMoniker (OLE2.28) + */ +HRESULT WINAPI CreateFileMoniker16(LPCOLESTR16 lpszPathName,LPMONIKER* ppmk) +{ + FIXME("(%s,%p),stub!\n",lpszPathName,ppmk); + return E_NOTIMPL; +} diff --git a/reactos/lib/ole32/storage32.c b/reactos/lib/ole32/storage32.c index ffff1693311..4347e9632c4 100644 --- a/reactos/lib/ole32/storage32.c +++ b/reactos/lib/ole32/storage32.c @@ -5803,7 +5803,8 @@ HRESULT WINAPI StgOpenStorageOnILockBytes( * * */ -HRESULT WINAPI StgSetTimes(OLECHAR const *str, FILETIME const *a, FILETIME const *b, FILETIME const *c ) +HRESULT WINAPI StgSetTimes(OLECHAR const *str, FILETIME const *a, + FILETIME const *b, FILETIME const *c ) { FIXME("(%s, %p, %p, %p),stub!\n", debugstr_w(str), a, b, c); return S_OK; @@ -6855,6 +6856,7 @@ HRESULT OLECONVERT_CreateCompObjStream(LPSTORAGE pStorage, LPCSTR strOleTypeName HRESULT hStorageRes, hRes = S_OK; OLECONVERT_ISTORAGE_COMPOBJ IStorageCompObj; WCHAR wstrStreamName[] = {1,'C', 'o', 'm', 'p', 'O', 'b', 'j', 0}; + WCHAR bufferW[OLESTREAM_MAX_STR_LEN]; BYTE pCompObjUnknown1[] = {0x01, 0x00, 0xFE, 0xFF, 0x03, 0x0A, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF}; BYTE pCompObjUnknown2[] = {0xF4, 0x39, 0xB2, 0x71}; @@ -6880,7 +6882,9 @@ HRESULT OLECONVERT_CreateCompObjStream(LPSTORAGE pStorage, LPCSTR strOleTypeName strcpy(IStorageCompObj.strProgIDName, strOleTypeName); /* Get the CLSID */ - hRes = CLSIDFromProgID16(IStorageCompObj.strProgIDName, &(IStorageCompObj.clsid)); + MultiByteToWideChar( CP_ACP, 0, IStorageCompObj.strProgIDName, -1, + bufferW, OLESTREAM_MAX_STR_LEN ); + hRes = CLSIDFromProgID(bufferW, &(IStorageCompObj.clsid)); if(hRes == S_OK) { diff --git a/reactos/lib/ole32/winehq2ros.patch b/reactos/lib/ole32/winehq2ros.patch index 35100d66503..e36101fcdb7 100644 --- a/reactos/lib/ole32/winehq2ros.patch +++ b/reactos/lib/ole32/winehq2ros.patch @@ -1,27 +1,11 @@ -Index: compobj.c -=================================================================== -RCS file: /home/wine/wine/dlls/ole32/compobj.c,v -retrieving revision 1.86 -diff -u -r1.86 compobj.c ---- compobj.c 23 Jan 2004 01:51:34 -0000 1.86 -+++ compobj.c 23 Jan 2004 14:35:27 -0000 -@@ -565,7 +565,7 @@ - /*****************************************************************************/ - - HRESULT WINAPI CLSIDFromString( -- LPCOLESTR idstr, /* [in] string representation of GUID */ -+ LPOLESTR idstr, /* [in] string representation of GUID */ - CLSID *id ) /* [out] GUID represented by above string */ - { - char xid[40]; Index: ifs.h =================================================================== RCS file: /home/wine/wine/dlls/ole32/ifs.h,v -retrieving revision 1.10 -diff -u -r1.10 ifs.h ---- ifs.h 14 Oct 2003 20:23:01 -0000 1.10 -+++ ifs.h 23 Jan 2004 14:35:33 -0000 -@@ -31,6 +31,7 @@ +retrieving revision 1.11 +diff -u -r1.11 ifs.h +--- ifs.h 23 Jan 2004 22:51:42 -0000 1.11 ++++ ifs.h 28 Jan 2004 21:32:28 -0000 +@@ -35,6 +35,7 @@ typedef struct IMalloc16 IMalloc16, *LPMALLOC16; @@ -29,76 +13,3 @@ diff -u -r1.10 ifs.h #define INTERFACE IMalloc16 #define IMalloc16_METHODS \ IUnknown_METHODS \ -Index: ole2.c -=================================================================== -RCS file: /home/wine/wine/dlls/ole32/ole2.c,v -retrieving revision 1.48 -diff -u -r1.48 ole2.c ---- ole2.c 8 Dec 2003 22:46:08 -0000 1.48 -+++ ole2.c 23 Jan 2004 14:35:37 -0000 -@@ -1419,6 +1419,7 @@ - */ - BOOL WINAPI IsAccelerator(HACCEL hAccel, int cAccelEntries, LPMSG lpMsg, WORD* lpwCmd) - { -+#if 0 /* Not implemented for ReactOS */ - /* YES, Accel16! */ - LPACCEL16 lpAccelTbl; - int i; -@@ -1485,6 +1486,9 @@ - found: - if(lpwCmd) *lpwCmd = lpAccelTbl[i].cmd; - return TRUE; -+#else -+ return FALSE; -+#endif - } - - /*********************************************************************** -Index: ole2stubs.c -=================================================================== -RCS file: /home/wine/wine/dlls/ole32/ole2stubs.c,v -retrieving revision 1.34 -diff -u -r1.34 ole2stubs.c ---- ole2stubs.c 8 Dec 2003 22:46:08 -0000 1.34 -+++ ole2stubs.c 23 Jan 2004 14:35:37 -0000 -@@ -47,11 +47,11 @@ - /****************************************************************************** - * OleDuplicateData [OLE32.@] - */ --HRESULT WINAPI OleDuplicateData(HANDLE hSrc, CLIPFORMAT cfFormat, -+HANDLE WINAPI OleDuplicateData(HANDLE hSrc, CLIPFORMAT cfFormat, - UINT uiFlags) - { - FIXME("(%p,%x,%x), stub!\n", hSrc, cfFormat, uiFlags); -- return E_NOTIMPL; -+ return NULL; - } - - -Index: storage32.c -=================================================================== -RCS file: /home/wine/wine/dlls/ole32/storage32.c,v -retrieving revision 1.45 -diff -u -r1.45 storage32.c ---- storage32.c 23 Jan 2004 01:51:34 -0000 1.45 -+++ storage32.c 23 Jan 2004 14:35:45 -0000 -@@ -5803,7 +5803,7 @@ - * - * - */ --HRESULT WINAPI StgSetTimes(OLECHAR *str, FILETIME *a, FILETIME *b, FILETIME *c ) -+HRESULT WINAPI StgSetTimes(OLECHAR const *str, FILETIME const *a, FILETIME const *b, FILETIME const *c ) - { - FIXME("(%s, %p, %p, %p),stub!\n", debugstr_w(str), a, b, c); - return S_OK; -@@ -7435,8 +7435,8 @@ - /*********************************************************************** - * GetConvertStg (OLE32.@) - */ --HRESULT WINAPI GetConvertStg(LPGUID guid) { -- FIXME("(%s), unimplemented stub!\n",debugstr_guid(guid)); -+HRESULT WINAPI GetConvertStg(IStorage *stg) { -+ FIXME("unimplemented stub!\n"); - return E_FAIL; - } -