Using the dcerpc library/API to make an RPC connection to Windows
jelmer at samba.org
Thu Mar 12 05:55:06 MDT 2015
On Tue, Mar 10, 2015 at 03:24:23PM -0400, Peter P. wrote:
> I'm currently trying to understand the dcerpc library that is a part of the
> Samba 4.2.0 build. I was interested in seeing if it is possible to interact
> with this library in a similar fashion to how Windows applications use the
> RPC dlls that are included with Visual Studio.
> Specifically, I would like to know if there are any exposed functions in
> Samba to create an RPC binding handle and how to use that with the stubs
> generated by pidl.
> Any information would be appreciated.
This is possible, although the process is not very well documented and the
APIs are prone to changes.
For examples of how to do this, I would suggest looking at the source code
for the winexe project. IIRC they have a standalone build that links
against Samba. http://sourceforge.net/projects/winexe/
Another (more complex) example of a project that uses Samba's DCE/RPC
infrastructure is OpenChange.
More information about the samba-technical