Advapi32: Service Control RPC

Rolf Kalbermatter r.kalbermatter at
Wed Jan 9 13:06:46 CST 2008

The current service control API directly accesses the registry for most
In native those fucntions are simple wrappers around RPC calls to the actual
service.exe application. Mikolaj Zalewski offered about 3 months ago a
aproach to implement the service.exe program.

In there the proxy code generated through widl directly calls various RPC
to communicate with the service manager executable. When doing some tests
with native
advapi32 under Wine I found that those fucntions seem to be implemented by
calling more or less directly NdrCallClient2. Widl obviously doesn't
generate code
yet using this API and I'm sure wire compatibility can be achieved without

But a few questions that came up here:
- How good or complete is Wine's NdrCallClient(2) implementation? Would it
be feasable
  to use it for the implementation of the service rpc calls?
- Assuming it would be not a whole lot of work to make NdrCallClient(2) work
for this,
  would it be desirable to use this API instead of the code generated by
widl currently
  from complexity and/or performance view?
- Of course this would mean that widl would have to support (some of) the
{Oi | Oic | Oif | Oicf}
  flags to generate the proxy code but as it seems the necessary code
generator at least
  for the client side would be fairly trivial as it is mostly just a wrapper
  NdrClientCall(2) and most of the nitty gritty work is done in in that
  A midl generated proxy code using -Oicf looks at least quite trivial. 

Any opinions about this anyone?

Rolf Kalbermatter

More information about the wine-devel mailing list