Sync to Wine-0_9_3: Michael Jung mjung@iss.tu-darmstadt.de - Made the Drag&Drop cursors' rubber band visible on a white background. - Correct the hot spot position of the drag&drop 'move' and 'link' cursors. Francois Gouget fgouget@free.fr - Assorted spelling fixes. Robert Shearman rob@codeweavers.com - Delegate advises to the remote object to enable the client to receive data change notifications. - Implement IOleObject_DoVerb function by running the object and then delegating to the remote IOleObject_DoVerb function. - Call DefaultHandler_Stop if we fail to start the server running correctly and a few formatting fixes. - Call the equivalent delegate function for all of the simple functions. - OLE: Fix a typo where brackets were missing. - Implement some user marshal functions and add tests. Modified: trunk/reactos/include/wine/objidl.h Deleted: trunk/reactos/lib/ole32/Makefile.in Modified: trunk/reactos/lib/ole32/compobj_private.h Modified: trunk/reactos/lib/ole32/defaulthandler.c Modified: trunk/reactos/lib/ole32/ole32.spec Modified: trunk/reactos/lib/ole32/ole32.xml Modified: trunk/reactos/lib/ole32/ole32res.rc Modified: trunk/reactos/lib/ole32/oleobj.c Modified: trunk/reactos/lib/ole32/rpc.c Added: trunk/reactos/lib/ole32/usrmarshal.c Modified: trunk/reactos/w32api/include/wtypes.h _____
Modified: trunk/reactos/include/wine/objidl.h --- trunk/reactos/include/wine/objidl.h 2005-12-12 23:04:15 UTC (rev 20134) +++ trunk/reactos/include/wine/objidl.h 2005-12-12 23:53:06 UTC (rev 20135) @@ -2120,5 +2120,37 @@
#endif /* __IMultiQI_INTERFACE_DEFINED__ */
+typedef struct _GDI_OBJECT { + DWORD ObjectType; + union { + wireHBITMAP hBitmap; + wireHPALETTE hPalette; + wireHGLOBAL hGeneric; + } u; +} GDI_OBJECT; +typedef struct _userSTGMEDIUM { + struct { + DWORD tymed; + union { + wireHMETAFILEPICT hMetaFilePict; + wireHENHMETAFILE hHEnhMetaFile; + GDI_OBJECT *hGdiHandle; + wireHGLOBAL hGlobal; + LPOLESTR lpszFileName; + BYTE_BLOB *pstm; + BYTE_BLOB *pstg; + } u; + } DUMMYSTRUCTNAME; + IUnknown *pUnkForRelease; +} userSTGMEDIUM; +typedef userSTGMEDIUM *wireSTGMEDIUM; +typedef userSTGMEDIUM *wireASYNC_STGMEDIUM; +typedef STGMEDIUM ASYNC_STGMEDIUM; +typedef STGMEDIUM *LPSTGMEDIUM; +typedef struct _FLAG_STGMEDIUM { + long ContextFlags; + long fPassOwnership; + STGMEDIUM Stgmed; +} FLAG_STGMEDIUM;
#endif /* __WINE_OBJIDL_H */ _____
Deleted: trunk/reactos/lib/ole32/Makefile.in --- trunk/reactos/lib/ole32/Makefile.in 2005-12-12 23:04:15 UTC (rev 20134) +++ trunk/reactos/lib/ole32/Makefile.in 2005-12-12 23:53:06 UTC (rev 20135) @@ -1,78 +0,0 @@
-EXTRADEFS = -D_OLE32_ -DCOM_NO_WINDOWS_H -TOPSRCDIR = @top_srcdir@ -TOPOBJDIR = ../.. -SRCDIR = @srcdir@ -VPATH = @srcdir@ -MODULE = ole32.dll -IMPORTLIB = libole32.$(IMPLIBEXT) -IMPORTS = advapi32 user32 gdi32 rpcrt4 kernel32 ntdll -EXTRALIBS = -luuid $(LIBUNICODE) - -C_SRCS = \ - antimoniker.c \ - bindctx.c \ - clipboard.c \ - compobj.c \ - compositemoniker.c \ - datacache.c \ - defaulthandler.c \ - dictionary.c \ - errorinfo.c \ - filemoniker.c \ - ftmarshal.c \ - git.c \ - hglobalstream.c \ - ifs.c \ - itemmoniker.c \ - marshal.c \ - memlockbytes.c \ - moniker.c \ - ole2.c \ - ole2stubs.c \ - ole2impl.c \ - ole32_main.c \ - oleobj.c \ - oleproxy.c \ - regsvr.c \ - rpc.c \ - stg_bigblockfile.c \ - stg_prop.c \ - stg_stream.c \ - storage32.c \ - stubmanager.c - -C_SRCS16 = \ - memlockbytes16.c \ - ole16.c \ - ole2_16.c \ - ole2nls.c \ - storage.c - -SPEC_SRCS16 = \ - compobj.spec \ - ole2.spec \ - ole2conv.spec \ - ole2nls.spec \ - ole2prox.spec \ - ole2thk.spec \ - storage.spec - -RC_SRCS = ole32res.rc -RC_BINSRC = ole32res.rc -RC_BINARIES = \ - drag_copy.cur \ - drag_link.cur \ - drag_move.cur \ - nodrop.cur - -IDL_SRCS = \ - dcom.idl - -SUBDIRS = tests - -@MAKE_DLL_RULES@ - -### Dependencies: - -# note: this will get overwritten by make depend -$(ALL_OBJS): $(IDL_SRCS:.idl=.h) _____
Modified: trunk/reactos/lib/ole32/compobj_private.h --- trunk/reactos/lib/ole32/compobj_private.h 2005-12-12 23:04:15 UTC (rev 20134) +++ trunk/reactos/lib/ole32/compobj_private.h 2005-12-12 23:53:06 UTC (rev 20135) @@ -263,4 +263,8 @@
#define CHARS_IN_GUID 39 /* including NULL */
+/* Exported non-interface Data Advise Holder functions */ +HRESULT DataAdviseHolder_OnConnect(IDataAdviseHolder *iface, IDataObject *pDelegate); +void DataAdviseHolder_OnDisconnect(IDataAdviseHolder *iface); + #endif /* __WINE_OLE_COMPOBJ_H */ _____
Modified: trunk/reactos/lib/ole32/defaulthandler.c --- trunk/reactos/lib/ole32/defaulthandler.c 2005-12-12 23:04:15 UTC (rev 20134) +++ trunk/reactos/lib/ole32/defaulthandler.c 2005-12-12 23:53:06 UTC (rev 20135) @@ -55,8 +55,11 @@
#include "winbase.h" #include "winuser.h" #include "winerror.h" +#include "ole2.h" + +#include "compobj_private.h" + #include "wine/unicode.h" -#include "ole2.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(ole); @@ -108,6 +111,8 @@ IOleObject *pOleDelegate; /* IPersistStorage delegate */ IPersistStorage *pPSDelegate; + /* IDataObject delegate */ + IDataObject *pDataDelegate;
/* connection cookie for the advise on the delegate OLE object */ DWORD dwAdvConn; @@ -307,9 +312,13 @@ IOleClientSite* pClientSite) { DefaultHandler *This = impl_from_IOleObject(iface); + HRESULT hr = S_OK;
TRACE("(%p, %p)\n", iface, pClientSite);
+ if (This->pOleDelegate) + hr = IOleObject_SetClientSite(This->pOleDelegate, pClientSite); + /* * Make sure we release the previous client site if there * was one. @@ -371,6 +380,9 @@ debugstr_w(szContainerApp), debugstr_w(szContainerObj));
+ if (This->pOleDelegate) + IOleObject_SetHostNames(This->pOleDelegate, szContainerApp, szContainerObj); + /* Be sure to cleanup before re-assinging the strings. */ HeapFree( GetProcessHeap(), 0, This->containerApp ); This->containerApp = NULL; @@ -404,6 +416,12 @@
/* FIXME: call IOleCache_OnStop */
+ DataAdviseHolder_OnDisconnect(This->dataAdviseHolder); + if (This->pDataDelegate) + { + IDataObject_Release(This->pDataDelegate); + This->pDataDelegate = NULL; + } if (This->pPSDelegate) { IPersistStorage_Release(This->pPSDelegate); @@ -452,11 +470,16 @@ DWORD dwWhichMoniker, IMoniker* pmk) { + DefaultHandler *This = impl_from_IOleObject(iface); + TRACE("(%p, %ld, %p)\n", iface, dwWhichMoniker, pmk);
+ if (This->pOleDelegate) + return IOleObject_SetMoniker(This->pOleDelegate, dwWhichMoniker, pmk); + return S_OK; }
@@ -478,6 +501,11 @@ TRACE("(%p, %ld, %ld, %p)\n", iface, dwAssign, dwWhichMoniker, ppmk);
+ if (This->pOleDelegate) + return IOleObject_GetMoniker(This->pOleDelegate, dwAssign, dwWhichMoniker, + ppmk); + + /* FIXME: dwWhichMoniker == OLEWHICHMK_CONTAINER only? */ if (This->clientSite) { return IOleClientSite_GetMoniker(This->clientSite, @@ -503,9 +531,14 @@ BOOL fCreation, DWORD dwReserved) { + DefaultHandler *This = impl_from_IOleObject(iface); + TRACE("(%p, %p, %d, %ld)\n", iface, pDataObject, fCreation, dwReserved);
+ if (This->pOleDelegate) + return IOleObject_InitFromData(This->pOleDelegate, pDataObject, fCreation, + dwReserved); return OLE_E_NOTRUNNING; }
@@ -521,9 +554,15 @@ DWORD dwReserved, IDataObject** ppDataObject) { + DefaultHandler *This = impl_from_IOleObject(iface); + TRACE("(%p, %ld, %p)\n", iface, dwReserved, ppDataObject);
+ if (This->pOleDelegate) + return IOleObject_GetClipboardData(This->pOleDelegate, dwReserved, + ppDataObject); + return OLE_E_NOTRUNNING; }
@@ -536,8 +575,17 @@ HWND hwndParent, LPCRECT lprcPosRect) { - FIXME(": Stub\n"); - return E_NOTIMPL; + DefaultHandler *This = impl_from_IOleObject(iface); + IRunnableObject *pRunnableObj = (IRunnableObject *)&This->lpvtblIRunnableObject; + HRESULT hr; + + TRACE("(%ld, %p, %p, %ld, %p, %s)\n", iVerb, lpmsg, pActiveSite, lindex, hwndParent, wine_dbgstr_rect(lprcPosRect)); + + hr = IRunnableObject_Run(pRunnableObj, NULL); + if (FAILED(hr)) return hr; + + return IOleObject_DoVerb(This->pOleDelegate, iVerb, lpmsg, pActiveSite, + lindex, hwndParent, lprcPosRect); }
/*********************************************************************** * @@ -650,8 +698,14 @@ DWORD dwDrawAspect, SIZEL* psizel) { + DefaultHandler *This = impl_from_IOleObject(iface); + TRACE("(%p, %lx, (%ld x %ld))\n", iface, dwDrawAspect, psizel->cx, psizel->cy); + + if (This->pOleDelegate) + IOleObject_SetExtent(This->pOleDelegate, dwDrawAspect, psizel); + return OLE_E_NOTRUNNING; }
@@ -676,8 +730,10 @@
TRACE("(%p, %lx, %p)\n", iface, dwDrawAspect, psizel);
+ if (This->pOleDelegate) + return IOleObject_GetExtent(This->pOleDelegate, dwDrawAspect, psizel); + hres = IUnknown_QueryInterface(This->dataCache, &IID_IViewObject2, (void**)&cacheView); - if (FAILED(hres)) return E_UNEXPECTED;
@@ -824,7 +880,7 @@ }
/*********************************************************************** * - * DefaultHandler_SetExtent (IOleObject) + * DefaultHandler_SetColorScheme (IOleObject) * * This method is meaningless if the server is not running * @@ -834,7 +890,13 @@ IOleObject* iface, struct tagLOGPALETTE* pLogpal) { + DefaultHandler *This = impl_from_IOleObject(iface); + TRACE("(%p, %p))\n", iface, pLogpal); + + if (This->pOleDelegate) + return IOleObject_SetColorScheme(This->pOleDelegate, pLogpal); + return OLE_E_NOTRUNNING; }
@@ -1212,24 +1274,29 @@ if (This->pOleDelegate) return S_OK;
- hr = CoCreateInstance(&This->clsid, NULL, CLSCTX_LOCAL_SERVER, &IID_IOleObject, (void **)&This->pOleDelegate); + hr = CoCreateInstance(&This->clsid, NULL, CLSCTX_LOCAL_SERVER, + &IID_IOleObject, (void **)&This->pOleDelegate); if (FAILED(hr)) return hr;
- hr = IOleObject_Advise(This->pOleDelegate, (IAdviseSink *)&This->lpvtblIAdviseSink, &This->dwAdvConn); + hr = IOleObject_Advise(This->pOleDelegate, + (IAdviseSink *)&This->lpvtblIAdviseSink, + &This->dwAdvConn);
if (SUCCEEDED(hr) && This->clientSite) hr = IOleObject_SetClientSite(This->pOleDelegate, This->clientSite);
if (SUCCEEDED(hr)) { - IOleObject_QueryInterface(This->pOleDelegate, &IID_IPersistStorage, (void **)&This->pPSDelegate); + IOleObject_QueryInterface(This->pOleDelegate, &IID_IPersistStorage, + (void **)&This->pPSDelegate); if (This->pPSDelegate) hr = IPersistStorage_InitNew(This->pPSDelegate, NULL); }
if (SUCCEEDED(hr) && This->containerApp) - hr = IOleObject_SetHostNames(This->pOleDelegate, This->containerApp, This->containerObj); + hr = IOleObject_SetHostNames(This->pOleDelegate, This->containerApp, + This->containerObj);
/* FIXME: do more stuff here: * - IOleObject_GetMiscStatus @@ -1237,8 +1304,16 @@ * - IOleCache_OnRun */
- /* FIXME: if we failed, Close the object */ + if (SUCCEEDED(hr)) + hr = IOleObject_QueryInterface(This->pOleDelegate, &IID_IDataObject, + (void **)&This->pDataDelegate);
+ if (SUCCEEDED(hr) && This->dataAdviseHolder) + hr = DataAdviseHolder_OnConnect(This->dataAdviseHolder, This->pDataDelegate); + + if (FAILED(hr)) + DefaultHandler_Stop(This); + return hr; }
@@ -1510,6 +1585,7 @@ This->containerObj = NULL; This->pOleDelegate = NULL; This->pPSDelegate = NULL; + This->pDataDelegate = NULL;
This->dwAdvConn = 0;
_____
Modified: trunk/reactos/lib/ole32/ole32.spec --- trunk/reactos/lib/ole32/ole32.spec 2005-12-12 23:04:15 UTC (rev 20134) +++ trunk/reactos/lib/ole32/ole32.spec 2005-12-12 23:53:06 UTC (rev 20135) @@ -1,8 +1,8 @@
@ stdcall BindMoniker(ptr long ptr ptr) -@ stub CLIPFORMAT_UserFree -@ stub CLIPFORMAT_UserMarshal -@ stub CLIPFORMAT_UserSize -@ stub CLIPFORMAT_UserUnmarshal +@ stdcall CLIPFORMAT_UserFree(ptr ptr) +@ stdcall CLIPFORMAT_UserMarshal(ptr ptr ptr) +@ stdcall CLIPFORMAT_UserSize(ptr long ptr) +@ stdcall CLIPFORMAT_UserUnmarshal(ptr ptr ptr) @ stdcall CLSIDFromProgID(wstr ptr) @ stdcall CLSIDFromString(wstr ptr) @ stdcall CoAddRefServerProcess() @@ -107,30 +107,34 @@ @ stdcall GetHGlobalFromStream(ptr ptr) @ stub GetHookInterface @ stdcall GetRunningObjectTable(long ptr) -@ stub HACCEL_UserFree -@ stub HACCEL_UserMarshal -@ stub HACCEL_UserSize -@ stub HACCEL_UserUnmarshal -@ stub HBITMAP_UserFree -@ stub HBITMAP_UserMarshal -@ stub HBITMAP_UserSize -@ stub HBITMAP_UserUnmarshal +@ stdcall HACCEL_UserFree(ptr ptr) +@ stdcall HACCEL_UserMarshal(ptr ptr ptr) +@ stdcall HACCEL_UserSize(ptr long ptr) +@ stdcall HACCEL_UserUnmarshal(ptr ptr ptr) +@ stdcall HBITMAP_UserFree(ptr ptr) +@ stdcall HBITMAP_UserMarshal(ptr ptr ptr) +@ stdcall HBITMAP_UserSize(ptr long ptr) +@ stdcall HBITMAP_UserUnmarshal(ptr ptr ptr) @ stub HBRUSH_UserFree @ stub HBRUSH_UserMarshal @ stub HBRUSH_UserSize @ stub HBRUSH_UserUnmarshal -@ stub HENHMETAFILE_UserFree -@ stub HENHMETAFILE_UserMarshal -@ stub HENHMETAFILE_UserSize -@ stub HENHMETAFILE_UserUnmarshal -@ stub HGLOBAL_UserFree -@ stub HGLOBAL_UserMarshal -@ stub HGLOBAL_UserSize -@ stub HGLOBAL_UserUnmarshal -@ stub HMENU_UserFree -@ stub HMENU_UserMarshal -@ stub HMENU_UserSize -@ stub HMENU_UserUnmarshal +@ stdcall HDC_UserFree(ptr ptr) +@ stdcall HDC_UserMarshal(ptr ptr ptr) +@ stdcall HDC_UserSize(ptr long ptr) +@ stdcall HDC_UserUnmarshal(ptr ptr ptr) +@ stdcall HENHMETAFILE_UserFree(ptr ptr) +@ stdcall HENHMETAFILE_UserMarshal(ptr ptr ptr) +@ stdcall HENHMETAFILE_UserSize(ptr long ptr) +@ stdcall HENHMETAFILE_UserUnmarshal(ptr ptr ptr) +@ stdcall HGLOBAL_UserFree(ptr ptr) +@ stdcall HGLOBAL_UserMarshal(ptr ptr ptr) +@ stdcall HGLOBAL_UserSize(ptr long ptr) +@ stdcall HGLOBAL_UserUnmarshal(ptr ptr ptr) +@ stdcall HMENU_UserFree(ptr ptr) +@ stdcall HMENU_UserMarshal(ptr ptr ptr) +@ stdcall HMENU_UserSize(ptr long ptr) +@ stdcall HMENU_UserUnmarshal(ptr ptr ptr) @ stub HMETAFILEPICT_UserFree @ stub HMETAFILEPICT_UserMarshal @ stub HMETAFILEPICT_UserSize @@ -139,14 +143,14 @@ @ stub HMETAFILE_UserMarshal @ stub HMETAFILE_UserSize @ stub HMETAFILE_UserUnmarshal -@ stub HPALETTE_UserFree -@ stub HPALETTE_UserMarshal -@ stub HPALETTE_UserSize -@ stub HPALETTE_UserUnmarshal -@ stub HWND_UserFree -@ stub HWND_UserMarshal -@ stub HWND_UserSize -@ stub HWND_UserUnmarshal +@ stdcall HPALETTE_UserFree(ptr ptr) +@ stdcall HPALETTE_UserMarshal(ptr ptr ptr) +@ stdcall HPALETTE_UserSize(ptr long ptr) +@ stdcall HPALETTE_UserUnmarshal(ptr ptr ptr) +@ stdcall HWND_UserFree(ptr ptr) +@ stdcall HWND_UserMarshal(ptr ptr ptr) +@ stdcall HWND_UserSize(ptr long ptr) +@ stdcall HWND_UserUnmarshal(ptr ptr ptr) @ stdcall IIDFromString(wstr ptr) CLSIDFromString @ stub I_RemoteMain @ stdcall IsAccelerator(long long ptr long) @@ -227,14 +231,14 @@ @ stdcall RegisterDragDrop(long ptr) @ stdcall ReleaseStgMedium(ptr) @ stdcall RevokeDragDrop(long) -@ stub SNB_UserFree -@ stub SNB_UserMarshal -@ stub SNB_UserSize -@ stub SNB_UserUnmarshal -@ stub STGMEDIUM_UserFree -@ stub STGMEDIUM_UserMarshal -@ stub STGMEDIUM_UserSize -@ stub STGMEDIUM_UserUnmarshal +@ stdcall SNB_UserFree(ptr ptr) +@ stdcall SNB_UserMarshal(ptr ptr ptr) +@ stdcall SNB_UserSize(ptr long ptr) +@ stdcall SNB_UserUnmarshal(ptr ptr ptr) +@ stdcall STGMEDIUM_UserFree(ptr ptr) +@ stdcall STGMEDIUM_UserMarshal(ptr ptr ptr) +@ stdcall STGMEDIUM_UserSize(ptr long ptr) +@ stdcall STGMEDIUM_UserUnmarshal(ptr ptr ptr) @ stdcall SetConvertStg(ptr long) @ stub SetDocumentBitStg @ stdcall SetErrorInfo(long ptr) _____
Modified: trunk/reactos/lib/ole32/ole32.xml --- trunk/reactos/lib/ole32/ole32.xml 2005-12-12 23:04:15 UTC (rev 20134) +++ trunk/reactos/lib/ole32/ole32.xml 2005-12-12 23:53:06 UTC (rev 20135) @@ -48,6 +48,7 @@
<file>stg_stream.c</file> <file>storage32.c</file> <file>stubmanager.c</file> + <file>usrmarshal.c</file> <file>ole32res.rc</file> <file>ole32.spec</file> </module> _____
Modified: trunk/reactos/lib/ole32/ole32res.rc --- trunk/reactos/lib/ole32/ole32res.rc 2005-12-12 23:04:15 UTC (rev 20134) +++ trunk/reactos/lib/ole32/ole32res.rc 2005-12-12 23:53:06 UTC (rev 20135) @@ -62,22 +62,22 @@
/* BINRES drag_move.cur */ 1 CURSOR drag_move.cur /* { - '00 00 02 00 01 00 20 20 00 00 12 00 16 00 30 01' + '00 00 02 00 01 00 20 20 00 00 01 00 01 00 30 01' '00 00 16 00 00 00 28 00 00 00 20 00 00 00 40 00' '00 00 01 00 01 00 00 00 00 00 00 01 00 00 00 00' '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' '00 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00' '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' '00 00 05 55 00 00 0A AA 80 00 04 01 00 00 08 00' - '80 00 04 01 00 00 08 00 80 00 05 55 00 00 0A EA' + '80 00 04 01 00 00 08 00 80 00 05 55 00 00 0A AA' '80 00 00 C0 00 00 01 80 00 00 01 80 00 00 03 00' '00 00 23 00 00 00 36 00 00 00 3E 00 00 00 3F C0' '00 00 3F 80 00 00 3F 00 00 00 3E 00 00 00 3C 00' '00 00 38 00 00 00 30 00 00 00 20 00 00 00 00 00' '00 00 00 00 00 00 FF FF FF FF FF FF FF FF FF FF' 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FA AA FF FF F5 55 7F FF FB FE FF FF F7 FF' - '7F FF FB FE FF FF F7 FF 7F FF FA AA FF FF F5 15' + 'FF FF F0 00 7F FF F0 00 7F FF F3 FE 7F FF F3 FE' + '7F FF F3 FE 7F FF F3 FE 7F FF F0 00 7F FF F0 00' '7F FF FE 1F FF FF FC 3F FF FF BC 3F FF FF 98 7F' 'FF FF 88 7F FF FF 80 FF FF FF 80 0F FF FF 80 1F' 'FF FF 80 3F FF FF 80 7F FF FF 80 FF FF FF 81 FF' @@ -95,15 +95,15 @@ '00 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00' '00 00 00 00 00 00 00 07 F0 00 00 07 70 00 00 07' '70 00 05 54 10 00 0A A7 70 00 04 07 70 00 08 07' - 'F0 00 04 00 00 00 08 00 80 00 05 55 00 00 0A EA' + 'F0 00 04 00 00 00 08 00 80 00 05 55 00 00 0A AA' '80 00 00 C0 00 00 01 80 00 00 01 80 00 00 03 00' '00 00 23 00 00 00 36 00 00 00 3E 00 00 00 3F C0' '00 00 3F 80 00 00 3F 00 00 00 3E 00 00 00 3C 00' '00 00 38 00 00 00 30 00 00 00 20 00 00 00 00 00' '00 00 00 00 00 00 FF FF FF FF FF FF FF FF FF FF' 'FF FF FF F0 07 FF FF F0 07 FF FF F0 07 FF FF F0' - '07 FF FA A0 07 FF F5 50 07 FF FB F0 07 FF F7 F0' - '07 FF FB F0 07 FF F7 FF 7F FF FA AA FF FF F5 15' + '07 FF F0 00 07 FF F0 00 07 FF F3 F0 07 FF F3 F0' + '07 FF F3 F0 07 FF F3 FE 7F FF F0 00 7F FF F0 00' '7F FF FE 1F FF FF FC 3F FF FF BC 3F FF FF 98 7F' 'FF FF 88 7F FF FF 80 FF FF FF 80 0F FF FF 80 1F' 'FF FF 80 3F FF FF 80 7F FF FF 80 FF FF FF 81 FF' @@ -114,22 +114,22 @@ /* BINRES drag_link.cur */ 3 CURSOR drag_link.cur /* { - '00 00 02 00 01 00 20 20 00 00 12 00 16 00 30 01' + '00 00 02 00 01 00 20 20 00 00 01 00 01 00 30 01' '00 00 16 00 00 00 28 00 00 00 20 00 00 00 40 00' '00 00 01 00 01 00 00 00 00 00 00 01 00 00 00 00' '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' '00 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00' '00 00 00 00 00 00 00 07 F0 00 00 06 F0 00 00 06' 'F0 00 05 57 50 00 0A A7 90 00 04 07 10 00 08 07' - 'F0 00 04 00 00 00 08 00 80 00 05 55 00 00 0A EA' + 'F0 00 04 00 00 00 08 00 80 00 05 55 00 00 0A AA' '80 00 00 C0 00 00 01 80 00 00 01 80 00 00 03 00' '00 00 23 00 00 00 36 00 00 00 3E 00 00 00 3F C0' '00 00 3F 80 00 00 3F 00 00 00 3E 00 00 00 3C 00' '00 00 38 00 00 00 30 00 00 00 20 00 00 00 00 00' '00 00 00 00 00 00 FF FF FF FF FF FF FF FF FF FF' 'FF FF FF F0 07 FF FF F0 07 FF FF F0 07 FF FF F0' - '07 FF FA A0 07 FF F5 50 07 FF FB F0 07 FF F7 F0' - '07 FF FB F0 07 FF F7 FF 7F FF FA AA FF FF F5 15' + '07 FF F0 00 07 FF F0 00 07 FF F3 F0 07 FF F3 F0' + '07 FF F3 F0 07 FF F3 FE 7F FF F0 00 7F FF F0 00' '7F FF FE 1F FF FF FC 3F FF FF BC 3F FF FF 98 7F' 'FF FF 88 7F FF FF 80 FF FF FF 80 0F FF FF 80 1F' 'FF FF 80 3F FF FF 80 7F FF FF 80 FF FF FF 81 FF' _____
Modified: trunk/reactos/lib/ole32/oleobj.c --- trunk/reactos/lib/ole32/oleobj.c 2005-12-12 23:04:15 UTC (rev 20134) +++ trunk/reactos/lib/ole32/oleobj.c 2005-12-12 23:53:06 UTC (rev 20135) @@ -351,6 +351,7 @@
IAdviseSink *sink; FORMATETC fmat; DWORD advf; + DWORD remote_connection; } DataAdviseConnection;
typedef struct DataAdviseHolder @@ -362,6 +363,9 @@ DataAdviseConnection* Connections; } DataAdviseHolder;
+/* this connection has also has been advised to the delegate data object */ +#define WINE_ADVF_REMOTE 0x80000000 +
/*********************************************************************** ******* * DataAdviseHolder_Destructor */ @@ -520,7 +524,7 @@ */ This->Connections[index].sink = pAdvise; memcpy(&(This->Connections[index].fmat), pFetc, sizeof(FORMATETC)); - This->Connections[index].advf = advf; + This->Connections[index].advf = advf & ~WINE_ADVF_REMOTE;
if (This->Connections[index].sink != NULL) { IAdviseSink_AddRef(This->Connections[index].sink); @@ -636,6 +640,33 @@ DataAdviseHolder_SendOnDataChange };
+HRESULT DataAdviseHolder_OnConnect(IDataAdviseHolder *iface, IDataObject *pDelegate) +{ + DataAdviseHolder *This = (DataAdviseHolder *)iface; + DWORD index; + HRESULT hr = S_OK; + + for(index = 0; index < This->maxCons; index++) + { + if(This->Connections[index].sink != NULL) + { + hr = IDataObject_DAdvise(pDelegate, &This->Connections[index].fmat, + This->Connections[index].advf, + This->Connections[index].sink, + &This->Connections[index].remote_connection); + if (FAILED(hr)) break; + This->Connections[index].advf |= WINE_ADVF_REMOTE; + } + } + /* FIXME: store pDelegate somewhere */ + return hr; +} + +void DataAdviseHolder_OnDisconnect(IDataAdviseHolder *iface) +{ + /* FIXME: Unadvise all remote interfaces */ +} +
/*********************************************************************** ******* * DataAdviseHolder_Constructor */ _____
Modified: trunk/reactos/lib/ole32/rpc.c --- trunk/reactos/lib/ole32/rpc.c 2005-12-12 23:04:15 UTC (rev 20134) +++ trunk/reactos/lib/ole32/rpc.c 2005-12-12 23:53:06 UTC (rev 20135) @@ -624,7 +624,7 @@
HKEY key; HRESULT hres; WCHAR command[MAX_PATH+sizeof(embedding)/sizeof(WCHAR)]; - DWORD size = MAX_PATH+1 * sizeof(WCHAR); + DWORD size = (MAX_PATH+1) * sizeof(WCHAR); STARTUPINFOW sinfo; PROCESS_INFORMATION pinfo;
_____
Copied: trunk/reactos/lib/ole32/usrmarshal.c (from rev 20134, vendor/wine/dlls/ole32/current/usrmarshal.c) Property changes on: trunk/reactos/lib/ole32/usrmarshal.c ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native _____
Modified: trunk/reactos/w32api/include/wtypes.h --- trunk/reactos/w32api/include/wtypes.h 2005-12-12 23:04:15 UTC (rev 20134) +++ trunk/reactos/w32api/include/wtypes.h 2005-12-12 23:53:06 UTC (rev 20135) @@ -191,6 +191,133 @@
} ByObjectId; } tagged_union; } uCLSSPEC; + +#define WDT_INPROC_CALL (0x48746457) + +#define WDT_REMOTE_CALL (0x52746457) + +#define WDT_INPROC64_CALL (0x50746457) + +typedef struct _userCLIPFORMAT { + long fContext; + union { + DWORD dwValue; + LPWSTR pwszName; + } u; +} userCLIPFORMAT; +typedef userCLIPFORMAT *wireCLIPFORMAT; +typedef WORD CLIPFORMAT; + +typedef struct _RemotableHandle { + long fContext; + union { + long hInproc; + long hRemote; + } u; +} RemotableHandle; +typedef RemotableHandle *wireHACCEL; +typedef RemotableHandle *wireHBRUSH; +typedef RemotableHandle *wireHDC; +typedef RemotableHandle *wireHFONT; +typedef RemotableHandle *wireHICON; +typedef RemotableHandle *wireHMENU; +typedef RemotableHandle *wireHWND; + +typedef struct _BYTE_BLOB { + unsigned long clSize; + byte abData[1]; +} BYTE_BLOB; +typedef BYTE_BLOB *UP_BYTE_BLOB; +typedef struct _FLAGGED_BYTE_BLOB { + unsigned long fFlags; + unsigned long clSize; + byte abData[1]; +} FLAGGED_BYTE_BLOB; +typedef FLAGGED_BYTE_BLOB *UP_FLAGGED_BYTE_BLOB; + +typedef struct _userHENHMETAFILE { + long fContext; + union { + long hInproc; + BYTE_BLOB *hRemote; + long hGlobal; + } u; +} userHENHMETAFILE; +typedef userHENHMETAFILE *wireHENHMETAFILE; +typedef struct tagRemHMETAFILEPICT { + long mm; + long xExt; + long yExt; + unsigned long cbData; + byte data[1]; +} RemHMETAFILEPICT; +typedef struct _userHMETAFILE { + long fContext; + union { + long hInproc; + BYTE_BLOB *hRemote; + long hGlobal; + } u; +} userHMETAFILE; +typedef userHMETAFILE *wireHMETAFILE; +typedef struct _remoteMETAFILEPICT { + long mm; + long xExt; + long yExt; + userHMETAFILE *hMF; +} remoteMETAFILEPICT; +typedef struct _userHMETAFILEPICT { + long fContext; + union { + long hInproc; + remoteMETAFILEPICT *hRemote; + long hGlobal; + } u; +} userHMETAFILEPICT; +typedef userHMETAFILEPICT *wireHMETAFILEPICT; +typedef struct _userBITMAP { + LONG bmType; + LONG bmWidth; + LONG bmHeight; + LONG bmWidthBytes; + WORD bmPlanes; + WORD bmBitsPixel; + ULONG cbSize; + byte pBuffer[1]; +} userBITMAP; +typedef struct _userHBITMAP { + long fContext; + union { + long hInproc; + userBITMAP *hRemote; + long hGlobal; + } u; +} userHBITMAP; +typedef userHBITMAP *wireHBITMAP; +typedef struct tagrpcLOGPALETTE { + WORD palVersion; + WORD palNumEntries; + PALETTEENTRY palPalEntry[1]; +} rpcLOGPALETTE; +typedef struct _userHPALETTE { + long fContext; + union { + long hInproc; + rpcLOGPALETTE *hRemote; + long hGlobal; + } u; +} userHPALETTE; +typedef userHPALETTE *wireHPALETTE; +typedef struct _userHGLOBAL { + long fContext; + union { + long hInproc; + FLAGGED_BYTE_BLOB *hRemote; + long hGlobal; + } u; +} userHGLOBAL; +typedef userHGLOBAL *wireHGLOBAL; + #ifdef __cplusplus } #endif