Author: fireball
Date: Thu Aug 5 21:19:46 2010
New Revision: 48466
URL:
http://svn.reactos.org/svn/reactos?rev=48466&view=rev
Log:
- Sync ole32 and oleaut32 to Wine-1.3.
Modified:
trunk/reactos/dll/win32/ole32/ole2.c
trunk/reactos/dll/win32/oleaut32/oleaut32.spec
trunk/reactos/dll/win32/oleaut32/typelib.c
trunk/reactos/dll/win32/oleaut32/typelib2.c
Modified: trunk/reactos/dll/win32/ole32/ole2.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/ole2.c?rev…
==============================================================================
--- trunk/reactos/dll/win32/ole32/ole2.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/ole32/ole2.c [iso-8859-1] Thu Aug 5 21:19:46 2010
@@ -409,6 +409,7 @@
HRESULT hr;
IStream *stream;
HANDLE map;
+ IUnknown *unk;
TRACE("(%p,%p)\n", hwnd, pDropTarget);
@@ -449,7 +450,15 @@
hr = CreateStreamOnHGlobal(NULL, TRUE, &stream);
if(FAILED(hr)) return hr;
- hr = CoMarshalInterface(stream, &IID_IDropTarget, (IUnknown*)pDropTarget,
MSHCTX_LOCAL, NULL, MSHLFLAGS_TABLESTRONG);
+ hr = IDropTarget_QueryInterface(pDropTarget, &IID_IUnknown, (void**)&unk);
+ if(FAILED(hr))
+ {
+ IStream_Release(stream);
+ return hr;
+ }
+ hr = CoMarshalInterface(stream, &IID_IDropTarget, unk, MSHCTX_LOCAL, NULL,
MSHLFLAGS_TABLESTRONG);
+ IUnknown_Release(unk);
+
if(SUCCEEDED(hr))
{
hr = create_map_from_stream(stream, &map);
Modified: trunk/reactos/dll/win32/oleaut32/oleaut32.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/oleaut32/oleaut3…
==============================================================================
--- trunk/reactos/dll/win32/oleaut32/oleaut32.spec [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/oleaut32/oleaut32.spec [iso-8859-1] Thu Aug 5 21:19:46 2010
@@ -410,6 +410,8 @@
439 stdcall VarUI8FromUI2(long ptr)
440 stdcall VarUI8FromUI4(long ptr)
441 stdcall VarUI8FromDec(long ptr)
+442 stdcall RegisterTypeLibForUser(ptr wstr wstr)
+443 stdcall UnRegisterTypeLibForUser(ptr long long long long)
@ stdcall -private DllCanUnloadNow()
@ stdcall -private DllGetClassObject(ptr ptr ptr)
Modified: trunk/reactos/dll/win32/oleaut32/typelib.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/oleaut32/typelib…
==============================================================================
--- trunk/reactos/dll/win32/oleaut32/typelib.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/oleaut32/typelib.c [iso-8859-1] Thu Aug 5 21:19:46 2010
@@ -901,6 +901,49 @@
if (subKey) RegCloseKey(subKey);
if (key) RegCloseKey(key);
return result;
+}
+
+/******************************************************************************
+ * RegisterTypeLibForUser [OLEAUT32.442]
+ * Adds information about a type library to the user registry
+ * NOTES
+ * Docs: ITypeLib FAR * ptlib
+ * Docs: OLECHAR FAR* szFullPath
+ * Docs: OLECHAR FAR* szHelpDir
+ *
+ * RETURNS
+ * Success: S_OK
+ * Failure: Status
+ */
+HRESULT WINAPI RegisterTypeLibForUser(
+ ITypeLib * ptlib, /* [in] Pointer to the library*/
+ OLECHAR * szFullPath, /* [in] full Path of the library*/
+ OLECHAR * szHelpDir) /* [in] dir to the helpfile for the library,
+ may be NULL*/
+{
+ FIXME("(%p, %s, %s) registering the typelib system-wide\n", ptlib,
+ debugstr_w(szFullPath), debugstr_w(szHelpDir));
+ return RegisterTypeLib(ptlib, szFullPath, szHelpDir);
+}
+
+/******************************************************************************
+ * UnRegisterTypeLibForUser [OLEAUT32.443]
+ * Removes information about a type library from the user registry
+ *
+ * RETURNS
+ * Success: S_OK
+ * Failure: Status
+ */
+HRESULT WINAPI UnRegisterTypeLibForUser(
+ REFGUID libid, /* [in] GUID of the library */
+ WORD wVerMajor, /* [in] major version */
+ WORD wVerMinor, /* [in] minor version */
+ LCID lcid, /* [in] locale id */
+ SYSKIND syskind)
+{
+ FIXME("(%s, %u, %u, %u, %u) unregistering the typelib system-wide\n",
+ debugstr_guid(libid), wVerMajor, wVerMinor, lcid, syskind);
+ return UnRegisterTypeLib(libid, wVerMajor, wVerMinor, lcid, syskind);
}
/*======================= ITypeLib implementation =======================*/
@@ -6017,13 +6060,13 @@
unsigned int var_index;
TYPEKIND type_kind;
HRESULT hres;
- const TLBFuncDesc *pFuncInfo = This->funclist;
+ const TLBFuncDesc *pFuncInfo;
TRACE("(%p)(%p,id=%d,flags=0x%08x,%p,%p,%p,%p)\n",
This,pIUnk,memid,wFlags,pDispParams,pVarResult,pExcepInfo,pArgErr
);
- if( pFuncInfo->funcdesc.wFuncFlags == FUNCFLAG_FRESTRICTED )
+ if( This->TypeAttr.wTypeFlags & TYPEFLAG_FRESTRICTED )
return DISP_E_MEMBERNOTFOUND;
if (!pDispParams)
@@ -6045,7 +6088,8 @@
* FUNCDESC for dispinterfaces and we want the real function description */
for (pFuncInfo = This->funclist; pFuncInfo; pFuncInfo=pFuncInfo->next)
if ((memid == pFuncInfo->funcdesc.memid) &&
- (wFlags & pFuncInfo->funcdesc.invkind))
+ (wFlags & pFuncInfo->funcdesc.invkind) &&
+ (pFuncInfo->funcdesc.wFuncFlags & FUNCFLAG_FRESTRICTED) == 0)
break;
if (pFuncInfo) {
Modified: trunk/reactos/dll/win32/oleaut32/typelib2.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/oleaut32/typelib…
==============================================================================
--- trunk/reactos/dll/win32/oleaut32/typelib2.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/oleaut32/typelib2.c [iso-8859-1] Thu Aug 5 21:19:46 2010
@@ -317,7 +317,7 @@
while (offset != -1) {
guidentry = (MSFT_GuidEntry
*)&This->typelib_segment_data[MSFT_SEG_GUID][offset];
- if (!memcmp(guidentry, guid, sizeof(GUID))) return offset;
+ if (IsEqualGUID(guidentry, guid)) return offset;
offset = guidentry->next_hash;
}
@@ -1695,7 +1695,7 @@
impinfo.oGuid = guid_offset;
*phRefType = ctl2_alloc_importinfo(This->typelib, &impinfo)+1;
- if(!memcmp(&guid.guid, &IID_IDispatch, sizeof(GUID)))
+ if(IsEqualGUID(&guid.guid, &IID_IDispatch))
This->typelib->typelib_header.dispatchpos = *phRefType;
}
@@ -2469,7 +2469,7 @@
return hres;
}
- if(!memcmp(&typeattr->guid, &IID_IDispatch, sizeof(IDispatch)))
+ if(IsEqualGUID(&typeattr->guid, &IID_IDispatch))
This->typeinfo->flags |= TYPEFLAG_FDISPATCHABLE;
This->typeinfo->datatype2 += (typeattr->cFuncs<<16) + 1;