views:

93

answers:

3

Does anybody know how the NdrClientCall2() function in rpcrt4.dll can be called in code or how it can be used?

We've gone through the MSDN help - http://msdn.microsoft.com/en-us/library/aa374215(VS.85).aspx,

but didn't get any examples/samples how to use this function.

Please provide help.

Thank you.

A: 

Typically you don't ever call it directly - it requires a huge set of parameters prepared in a special barely-manageable way. Instead you use IDL to specify your RPC interface, compile it with MIDL and this gives you a client proxy that calls that function with proper parameters.

sharptooth
You're 29 seconds sharper than me...
dalle
A: 

The easiest would be to use and idl-file and use midl.exe to generate the client RPC stub, which utilizes the NdrClientCall2 internally.

dalle
A: 

This is normally called via the RPC client MIDL code - why do you want to call this directly?

Paul Betts