- Sync ole32 and oleaut32 to Wine-1.3.

svn path=/trunk/; revision=48466
This commit is contained in:
Aleksey Bragin 2010-08-05 21:19:46 +00:00
parent b51cf52307
commit c2ead94de7
4 changed files with 62 additions and 7 deletions

View file

@ -409,6 +409,7 @@ HRESULT WINAPI RegisterDragDrop(HWND hwnd, LPDROPTARGET pDropTarget)
HRESULT hr;
IStream *stream;
HANDLE map;
IUnknown *unk;
TRACE("(%p,%p)\n", hwnd, pDropTarget);
@ -449,7 +450,15 @@ HRESULT WINAPI RegisterDragDrop(HWND hwnd, LPDROPTARGET pDropTarget)
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);

View file

@ -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)

View file

@ -903,6 +903,49 @@ end:
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 =======================*/
typedef struct tagTLBCustData
@ -6017,13 +6060,13 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
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 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
* 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) {

View file

@ -317,7 +317,7 @@ static int ctl2_find_guid(
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 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddRefTypeInfo(
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 @@ static HRESULT WINAPI ICreateTypeInfo2_fnLayOut(
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;