Commit ff934e82 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

oleaut32: Implement ITypeComp::Bind() proxy/stub.

parent 9d1876f4
......@@ -82,6 +82,10 @@ unsigned char * WINAPI CLEANLOCALSTORAGE_UserMarshal(ULONG *pFlags, unsigned cha
{
ALIGN_POINTER(Buffer, 3);
*(DWORD*)Buffer = pstg->flags;
if (!pstg->pInterface)
return Buffer + sizeof(DWORD);
switch(pstg->flags)
{
case CLS_LIBATTR:
......@@ -1407,31 +1411,106 @@ static void free_embedded_elemdesc(ELEMDESC *edesc)
HRESULT CALLBACK ITypeComp_Bind_Proxy(
ITypeComp* This,
LPOLESTR szName,
LPOLESTR name,
ULONG lHashVal,
WORD wFlags,
ITypeInfo** ppTInfo,
DESCKIND* pDescKind,
BINDPTR* pBindPtr)
{
FIXME("not implemented\n");
return E_FAIL;
WORD flags,
ITypeInfo **ti,
DESCKIND *desckind,
BINDPTR *bindptr)
{
CLEANLOCALSTORAGE stg = { 0 };
ITypeComp *typecomp;
FUNCDESC *funcdesc;
VARDESC *vardesc;
HRESULT hr;
TRACE("(%p, %s, %#x, %#x, %p, %p, %p)\n", This, debugstr_w(name), lHashVal, flags, ti,
desckind, bindptr);
*desckind = DESCKIND_NONE;
memset(bindptr, 0, sizeof(*bindptr));
hr = ITypeComp_RemoteBind_Proxy(This, name, lHashVal, flags, ti, desckind,
&funcdesc, &vardesc, &typecomp, &stg);
if (hr == S_OK)
{
switch (*desckind)
{
case DESCKIND_FUNCDESC:
bindptr->lpfuncdesc = funcdesc;
break;
case DESCKIND_VARDESC:
case DESCKIND_IMPLICITAPPOBJ:
bindptr->lpvardesc = vardesc;
break;
case DESCKIND_TYPECOMP:
bindptr->lptcomp = typecomp;
break;
default:
;
}
}
return hr;
}
HRESULT __RPC_STUB ITypeComp_Bind_Stub(
ITypeComp* This,
LPOLESTR szName,
LPOLESTR name,
ULONG lHashVal,
WORD wFlags,
ITypeInfo** ppTInfo,
DESCKIND* pDescKind,
LPFUNCDESC* ppFuncDesc,
LPVARDESC* ppVarDesc,
ITypeComp** ppTypeComp,
CLEANLOCALSTORAGE* pDummy)
{
FIXME("not implemented\n");
return E_FAIL;
WORD flags,
ITypeInfo **ti,
DESCKIND *desckind,
FUNCDESC **funcdesc,
VARDESC **vardesc,
ITypeComp **typecomp,
CLEANLOCALSTORAGE *stg)
{
BINDPTR bindptr;
HRESULT hr;
TRACE("(%p, %s, %#x, %#x, %p, %p, %p, %p, %p, %p)\n", This, debugstr_w(name),
lHashVal, flags, ti, desckind, funcdesc, vardesc, typecomp, stg);
memset(stg, 0, sizeof(*stg));
memset(&bindptr, 0, sizeof(bindptr));
*funcdesc = NULL;
*vardesc = NULL;
*typecomp = NULL;
*ti = NULL;
hr = ITypeComp_Bind(This, name, lHashVal, flags, ti, desckind, &bindptr);
if(hr != S_OK)
return hr;
switch (*desckind)
{
case DESCKIND_FUNCDESC:
*funcdesc = bindptr.lpfuncdesc;
stg->pInterface = (IUnknown*)*ti;
stg->pStorage = funcdesc;
stg->flags = CLS_FUNCDESC;
break;
case DESCKIND_VARDESC:
case DESCKIND_IMPLICITAPPOBJ:
*vardesc = bindptr.lpvardesc;
stg->pInterface = (IUnknown*)*ti;
stg->pStorage = vardesc;
stg->flags = CLS_VARDESC;
break;
case DESCKIND_TYPECOMP:
*typecomp = bindptr.lptcomp;
break;
default:
;
}
if (stg->pInterface)
IUnknown_AddRef(stg->pInterface);
return hr;
}
HRESULT CALLBACK ITypeComp_BindType_Proxy(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment