ole32: implement CoGetCallContext and CoSwitchCallContext
Rob Shearman
robertshearman at gmail.com
Mon Dec 1 04:57:24 CST 2008
2008/11/30 Austin English <austinenglish at gmail.com>:
> + if( !ppv)
> + return E_INVALIDARG;
> +
> + /* get COM tls */
> + info = COM_CurrentInfo();
> + if( !info)
Please try to keep the style consistent here. The style that the rest
of the file uses is a space after the "if" and no space inside the
brackets.
> + return E_OUTOFMEMORY;
> +
> + hr = RPC_E_CALL_COMPLETE;
> + if( info->ctx_call)
> + {
> + hr = IUnknown_QueryInterface( info->ctx_call, riid, ppv);
> + }
> +
> + if (FAILED(hr))
...
> + /* Receives a pointer to the call context object of the call currently
> + in progress. This value is returned so that the original call context
> + can be restored by the custom marshaller.
> + The returned pointer will be NULL if there was no call in progress. */
> + *ppOldObject = info->ctx_call;
> +
> + /* It may be NULL if you are calling CoSwitchCallContext to switch back
> + to the original call context and there was no original call context. */
> + info->ctx_call = pNewObject;
You don't take a reference to the object that is passed-in. This is
against COM semantics and so requires a test case to prove that this
is indeed what the function does.
--
Rob Shearman
More information about the wine-devel
mailing list