void dispatch_rpc() returns a value

Bang Jun-Young bang.junyoung at gmail.com
Fri May 26 04:29:19 CDT 2006


Hi,

I wonder how this has been possible so far:

static void __RPC_STUB dispatch_rpc(RPC_MESSAGE *msg)
{
    struct dispatch_params *params;
    APARTMENT *apt;
    IPID ipid;
    HRESULT hr;

    RpcBindingInqObject(msg->Handle, &ipid);

    TRACE("ipid = %s, iMethod = %d\n", debugstr_guid(&ipid), msg->ProcNum);

    params = HeapAlloc(GetProcessHeap(), 0, sizeof(*params));
    if (!params) return RpcRaiseException(E_OUTOFMEMORY);

    hr = ipid_get_dispatch_params(&ipid, &apt, &params->stub, &params->chan);
    if (hr != S_OK)
    {
        ERR("no apartment found for ipid %s\n", debugstr_guid(&ipid));
        return RpcRaiseException(hr);
    }

dispatch_rpc() shouldn't return anything since it's a void function,
but it actually does.

Jun-Young



More information about the wine-devel mailing list