libmsrpc function naming

Chris Nicholls skel at samba.org
Thu Jul 21 19:49:11 GMT 2005


>Not to distract from the more humourous suggestions, but is there an
>existing windows library of similar function whose names you could
>imitate? I only ask from the perspective of, say, a Windows developer
>trying to use the API and being faced with a bunch of unfamiliar
>function calls for functions that developer already knows.
>
>  
>
Most of the msdn functions are named by the pipe/service they are using. 
For example LsaOpenPolicy (msdn). The libmsrpc equivalent function will 
probably be named cac_lsa_open_policy.  The prefix is necessary as 
client code (rpc_client/*.c) is named the same way 
(cli_lsa_open_policy). Actually now that i'm looking at both of these on 
the same page it might get confusing... but most developers working with 
libmsrpc will likely have no knowledge of the cli_ functions.

I had another thought about this as well, seeing as msdn groups their 
functions into things like Management (for SAM) and Authentication (for 
LSA). I considered naming functions something like cac_auth_open_policy 
(for the above operation). But i'm going to stick with naming them after 
the pipe.  I expect developers will know that they want to 'talk to' the 
LSA or the SAM or registry, etc. on the other end of the pipe.

Chris





More information about the samba-technical mailing list