please don't apply RPC Merge D_PL1

Greg Turner gmturner007 at ameritech.net
Sun Oct 13 16:57:47 CDT 2002


On Sunday 13 October 2002 03:06 pm, Greg Turner wrote:
> A few small things.
>
> Changelog:
>
> * dlls/rpcrt4: rpcrt4.spec, ndr_stubless.c, rpc_binding.c, rpc_server.c;
>   include/rpcdce.h: Greg Turner <gmturner007 at ameritech.net>
> - (try to) implement RpcMgmtWaitServerListen
> - remove duplicate RpcServerListen declaration in rpcdce.h
> - some TRACEs
>
> LICENSE: X11

There's something wrong with the stuff I did in ndr_stubless.c
(RpcMgmtWaitServerListen is kinda screwy too but that was intentional).
I seem to have scrambled my brain, perhaps somebody with
an unscrabled brain can help me...?

I submitted RPCRT4_NdrClientCall2 as:

LONG_PTR RPCRT4_NdrClientCall2(PMIDL_STUB_DESC pStubDesc, PFORMAT_STRING pFormat, va_list args)
{

  FIXME("(pStubDec == ^%p,pFormat = \"%s\",...): stub\n", pStubDesc, pFormat);

  PRPC_CLIENT_INTERFACE rpc_cli_if = (PRPC_CLIENT_INTERFACE) pStubDesc;

  TRACE("rpc_cli_if: Length == %d; InterfaceID == <%s,<%d.%d>>; TransferSyntax == <%s,<%d.%d>>; DispatchTable == ^%p; RpcProtseqEndpoi
ntCount == %d; RpcProtseqEndpoint == ^%p; Flags == %d\n",
   rpc_cli_if->Length,
   debugstr_guid(&rpc_cli_if->InterfaceId.SyntaxGUID), rpc_cli_if->InterfaceId.SyntaxVersion.MajorVersion, rpc_cli_if->InterfaceId.Syn
taxVersion.MinorVersion,
   debugstr_guid(&rpc_cli_if->TransferSyntax.SyntaxGUID), rpc_cli_if->TransferSyntax.SyntaxVersion.MajorVersion, rpc_cli_if->TransferS
yntax.SyntaxVersion.MinorVersion,
   rpc_cli_if->DispatchTable,
   rpc_cli_if->RpcProtseqEndpointCount,
   rpc_cli_if->RpcProtseqEndpoint,
   rpc_cli_if->Flags);

  return 0;
}

That's just wrong.  pStubDesc is /not/ a PRPC_CLIENT_INTERFACE.  Instead,
it is what it says it is, a PMIDL_STUB_DESC.  The first element of the PMIDL_STUB_DESC,
RpcInterfaceInformation /is/ a PRPC_CLIENT_INTERFACE, however---the one I want (right?).  
So now I do this:

LONG_PTR RPCRT4_NdrClientCall2(PMIDL_STUB_DESC pStubDesc, PFORMAT_STRING pFormat, va_list args)
{

  FIXME("(pStubDec == ^%p,pFormat = \"%s\",...): stub\n", pStubDesc, pFormat);

  PRPC_CLIENT_INTERFACE rpc_cli_if = (PRPC_CLIENT_INTERFACE)(pStubDesc->RpcInterfaceInformation);
  TRACE("rpc_cli_if == ^%p\n", rpc_cli_if);
 
  TRACE("rpc_cli_if: Length == %d; InterfaceID == <%s,<%d.%d>>; TransferSyntax == <%s,<%d.%d>>; DispatchTable == ^%p; RpcProtseqEndpointCount == %d; RpcProtseqEndpoint == ^%p; Flags == %d\n",
   rpc_cli_if->Length,
   debugstr_guid(&rpc_cli_if->InterfaceId.SyntaxGUID), rpc_cli_if->InterfaceId.SyntaxVersion.MajorVersion, rpc_cli_if->InterfaceId.SyntaxVersion.MinorVersion,
   debugstr_guid(&rpc_cli_if->TransferSyntax.SyntaxGUID), rpc_cli_if->TransferSyntax.SyntaxVersion.MajorVersion, rpc_cli_if->TransferSyntax.SyntaxVersion.MinorVersion,
   rpc_cli_if->DispatchTable, 
   rpc_cli_if->RpcProtseqEndpointCount, 
   rpc_cli_if->RpcProtseqEndpoint, 
   rpc_cli_if->Flags);

  return 0;
}

but that doesn't work out.  It blows up:

greg at yodull midled $ wine --dll rpcrt4,msvcrt=b --debugmsg +ole helloc
trace:ole:RpcStringBindingComposeA ((null),"ncacn_np",(null),"\\pipe\\hello",(null),0x406d2ddc)
RpcStringBindingCompose returned 0x0
pszStringBinding = ncacn_np:[\pipe\hello]
trace:ole:RpcBindingFromStringBindingA ("ncacn_np:[\\pipe\\hello]",0x403224)
trace:ole:RpcStringBindingParseA ("ncacn_np:[\\pipe\\hello]",0x406d2d68,0x406d2d6c,0x406d2d70,0x406d2d74,0x406d2d78)
trace:ole:RPCRT4_CreateBindingA binding: 0x403b4970
trace:ole:RPCRT4_SetBindingObject   (*RpcBinding == ^0x403b4970, UUID == {00000000-0000-0000-0000-000000000000})
trace:ole:RPCRT4_CompleteBindingA   (RpcBinding == ^0x403b4970, NetworkAddr == "", EndPoint == "\pipe\hello", NetworkOptions == "(null)")
RpcBindingFromStringBinding returned 0x0
Calling the remote procedure 'HelloProc'
Print the string 'hello, world' on the server
trace:ole:NdrClientCall2 (0x4020c2,0x406d2da4,...)
fixme:ole:RPCRT4_NdrClientCall2 (pStubDec == ^0x4020c2,pFormat = "0@",...): stub
trace:ole:RPCRT4_NdrClientCall2 rpc_cli_if = ^0x4832
Runtime reported exception 0xc0000005 = -1073741819

Obviously, it never succesfully displays the big trace stmt, probably crashing
deferincing the suspicious-looking "0x4832" pointer...

Surely I'm doing something really dumb and obvious; perhaps I just need more coffee...

Anyhow, for now, I'm in a muddle, D_PL1 should stay out until I fix it with a D_PL2.
Any help would be appreciated, I'm sure the problem is squarely between the chair and the
keyboard...

-- 
gmt

"It has been well said that really up-to-date liberals
do not care what people do, as long as it is compulsory."

-George F. Will




More information about the wine-devel mailing list