please don't apply RPC Merge D_PL1
gmturner007 at ameritech.net
Sun Oct 13 23:14:57 CDT 2002
On Sunday 13 October 2002 06:41 pm, Ove Kaaven wrote:
> The pStubDesc structure should have been initialized (including setting
> that pointer, I think) by the NdrClientInitialize or
> NdrClientInitializeNew (or for DCOM, NdrProxyInitialize, but perhaps
> NdrProxyInitialize should call down to NdrClientInitialize/New anyway)
> functions. My patches didn't implement those functions, since I was mostly
> concerned with DCOM. Is this a real RPC app that works on Windows you're
> working on?
Apparently this isn't how /Oicf works in this case... the MIDL-generated source
looks to me like I am recieving constant structures that should already have
been initialized statically.
To "prove" it here's the the client stub source (abridged and annotated):
* GMT: I hope this doesn't matter.... I think it only
* affects the wire representation, not yet my concern (soon!)
#error You need a Windows 2000 or later to run this stub because it uses these features:
#error /robust command line switch.
#error However, your C/C++ compilation flags indicate you intend to run this app on earlier systems.
#error This app will die there with the RPC_X_WRONG_STUB_VERSION error.
static const RPC_CLIENT_INTERFACE hello___RpcClientInterface =
* GMT: Interesting, I just noticed that there are two def's for hello_StubDesc;
* Could this be the one I'm getting instead of the one below? Doesn't the
* "extern" mean they will be one and the same? What a mess...
extern const MIDL_STUB_DESC hello_StubDesc;
/* [string][in] */ unsigned char *pszString)
( PMIDL_STUB_DESC )&hello_StubDesc,
* GMT: here is what I thought I was going to get:
static const MIDL_STUB_DESC hello_StubDesc =
(void *)& hello___RpcClientInterface,
1, /* -error bounds_check flag */
0x50002, /* Ndr library version */
0x6000169, /* MIDL Version 6.0.361 */
0, /* notify & notify_flag routine table */
0x1, /* MIDL flag */
0, /* cs routines */
0, /* proxy/server info */
0 /* Reserved5 */
Anyhow, if it was calling the functions you mention, it should be crashing with
unimplmented function, since there are no stubs, right? So, to me, it seems that
it's supposed to be giving me the above static const struct... and yet, as far as I can tell,
it ain't :(
Here's the main source, also abridged:
void __cdecl main(int argc, char **argv)
unsigned char * pszUuid = NULL;
unsigned char * pszProtocolSequence = "ncacn_np";
unsigned char * pszNetworkAddress = NULL;
unsigned char * pszEndpoint = "\\pipe\\hello";
unsigned char * pszOptions = NULL;
unsigned char * pszStringBinding = NULL;
unsigned char * pszString = "hello, world";
unsigned long ulCode;
status = RpcStringBindingCompose(pszUuid,
status = RpcBindingFromStringBinding(pszStringBinding,
printf("Calling the remote procedure 'HelloProc'\n");
HelloProc(pszString); // make call with user message
printf("Calling the remote procedure 'Shutdown'\n");
Shutdown(); // shut down the server side
ulCode = RpcExceptionCode();
printf("Runtime reported exception 0x%lx = %ld\n", ulCode, ulCode);
status = RpcStringFree(&pszStringBinding); // remote calls done; unbind
status = RpcBindingFree(&hello_IfHandle); // remote calls done; unbind
Hrmm... well, I'm stumped for tonight, time to play video games.
Thanks for your help.
"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