CVS update: samba4/source/librpc/idl
Richard Sharpe
rsharpe at richardsharpe.com
Wed Nov 19 20:23:13 GMT 2003
On Wed, 19 Nov 2003, Simo Sorce wrote:
> To me the two syntaxes seem equivalent, where's the difference?
> /simo's mind obfuscated at the end of the day
OK, as it turns out, both are wrong!
NetShareEnum in MSDN shows something like:
NET_API_STATUS NetShareEnum(
LPWSTR serbername,
DWORD level,
LPBYTE *bufptr, /* The Info struct */
DWORD prefmaxlen,
LPDWORD entriesread,
LPDWORD totalentries,
LPDWORD resume_handle
);
This means that level should be a top-level entity in the IDL, and it is
not in either. I will correct that in both.
However, in Ethereal, the SHARE_ENUM_STRUCT is shown as:
/*
* IDL typedef struct {
* IDL long Level;
* IDL SHARE_ENUM_UNION shares;
* IDL } SHARE_ENUM_STRUCT;
*/
Which is still not correct, but more correct than what is in the current
samba4 IDL:
typedef struct {
uint32 level;
uint32 level2;
[switch_is(level)] srvsvc_NetShareSubCtr subctr;
} srvsvc_NetShareCtr;
This is just ugly :-)
Also, I think we should use the same names as MSDN wherever possible!
> On Wed, 2003-11-19 at 19:29, Richard Sharpe wrote:
> > Hmmm, the IDL for NetrShareEnum seems wrong. For example, Ethereal, which
> > dissects this correctly, and follows MSDN in its naming conventions, has
> > it as:
> >
> > /*
> > * IDL long NetrShareEnum(
> > * IDL [in] [string] [unique] wchar_t *ServerName,
> > * IDL [in] [out] [ref] SHARE_ENUM_STRUCT *share,
> > * IDL [in] long MaxLen,
> > * IDL [out] long Entries,
> > * IDL [in] [out] [unique] long *ResumeHandle
> > * IDL );
> > */
> >
> > while the above change has it as:
> >
> > /******************/
> > /* Function: 0x24 */
> > WERROR srvsvc_NetShareEnum(
> > [in] unistr *server_unc,
> > [in,out] srvsvc_NetShareCtr ctr,
> > [in] uint32 preferred_len,
> > [out] uint32 total,
> > [in,out] uint32 *resume_handle
> > );
> >
> > Regards
> > -----
> > Richard Sharpe, rsharpe[at]ns.aus.com, rsharpe[at]samba.org,
> > sharpe[at]ethereal.com, http://www.richardsharpe.com
>
--
Regards
-----
Richard Sharpe, rsharpe[at]ns.aus.com, rsharpe[at]samba.org,
sharpe[at]ethereal.com, http://www.richardsharpe.com
More information about the samba-technical
mailing list