Q about pidl client code in Samba 3

Gerald (Jerry) Carter jerry at samba.org
Wed Sep 27 22:41:59 GMT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jelmer,

> I'm looking at the return code in rpccli_winreg_EnumKey():
> 
> 	/* Return variables */
> 	*name = *r.out.name;
> 	*keyclass = *r.out.keyclass;
> 	*last_changed_time = *r.out.last_changed_time;

Here's another thing I don't get.  name in this
case is struct winreg_String and is an [in,out,ref]
variable.  The problem with EnumKey is that the name
has to point to an existing buffer.  But the libndr
layer just works on strlen() in this case.

So I allocated a string of the correct size and called

	memset(name.name, 'a', maxsiz-1);
	name.name[maxsize-1] = '\0';

Is there an easier way to call these in/out ref
pointers?





cheers, jerry
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFGv43IR7qMdg1EfYRAnwIAJ4tV8mpO5IpAKTftITQ86l3/eSxkwCfby+z
99E9qOXVZJ15yP91vKWCDQ0=
=AnMR
-----END PGP SIGNATURE-----


More information about the samba-technical mailing list