From c7bb8bd4fe651b9b360bce5ca65c34fc593bf6b5 Mon Sep 17 00:00:00 2001 From: Huw Davies Date: Sun, 7 May 2006 22:00:51 +0100 Subject: [PATCH] oleaut32: Implement GetVarDesc_Proxy and friends. --- dlls/oleaut32/usrmarshal.c | 39 +++++++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/dlls/oleaut32/usrmarshal.c b/dlls/oleaut32/usrmarshal.c index fd24b4a315f..562983ab0a8 100644 --- a/dlls/oleaut32/usrmarshal.c +++ b/dlls/oleaut32/usrmarshal.c @@ -1448,8 +1448,14 @@ HRESULT CALLBACK ITypeInfo_GetVarDesc_Proxy( UINT index, VARDESC** ppVarDesc) { - FIXME("not implemented\n"); - return E_FAIL; + CLEANLOCALSTORAGE stg; + TRACE("(%p, %d, %p)\n", This, index, ppVarDesc); + + stg.flags = 0; + stg.pStorage = NULL; + stg.pInterface = NULL; + + return ITypeInfo_RemoteGetVarDesc_Proxy(This, index, ppVarDesc, &stg); } HRESULT __RPC_STUB ITypeInfo_GetVarDesc_Stub( @@ -1458,8 +1464,18 @@ HRESULT __RPC_STUB ITypeInfo_GetVarDesc_Stub( LPVARDESC* ppVarDesc, CLEANLOCALSTORAGE* pDummy) { - FIXME("not implemented\n"); - return E_FAIL; + HRESULT hr; + TRACE("(%p, %d, %p)\n", This, index, ppVarDesc); + + hr = ITypeInfo_GetVarDesc(This, index, ppVarDesc); + if(hr != S_OK) + return hr; + + pDummy->flags = CLS_VARDESC; + ITypeInfo_AddRef(This); + pDummy->pInterface = (IUnknown*)This; + pDummy->pStorage = ppVarDesc; + return hr; } HRESULT CALLBACK ITypeInfo_GetNames_Proxy( @@ -1709,14 +1725,23 @@ void CALLBACK ITypeInfo_ReleaseVarDesc_Proxy( ITypeInfo* This, VARDESC* pVarDesc) { - FIXME("not implemented\n"); + TRACE("(%p, %p)\n", This, pVarDesc); + + if(pVarDesc->lpstrSchema) + CoTaskMemFree(pVarDesc->lpstrSchema); + + if(pVarDesc->varkind == VAR_CONST) + CoTaskMemFree(pVarDesc->u.lpvarValue); + + free_embedded_elemdesc(&pVarDesc->elemdescVar); + CoTaskMemFree(pVarDesc); } HRESULT __RPC_STUB ITypeInfo_ReleaseVarDesc_Stub( ITypeInfo* This) { - FIXME("not implemented\n"); - return E_FAIL; + TRACE("nothing to do\n"); + return S_OK; }