dcerpc_winreg_QueryValue

tridge at samba.org tridge at samba.org
Thu Dec 9 05:50:26 GMT 2004


Jelmer,

 > | WERROR winreg_QueryValue(
 > | 	[in,ref] policy_handle *handle,
 > | 	[in] winreg_String valuename,
 > | 	[in] uint32 *reserved,
 > | 	[in] uint32 *offered,
 > | 	[in] uint32 unknown1,
 > | 	[in] uint32 unknown2,
 > | 	[out] uint32 *type,
 > | 	[out,size_is(*val_length),length_is(*val_length)] uint8 *data,
 > | 	[in,out] uint32 *offered2,
 > | 	[in,out] uint32 *val_length
 > | );

I don't think this is quite right. I think the correct IDL is this:

	WERROR winreg_QueryValue(
		[in,ref] policy_handle *handle,
		[in] winreg_String value_name,
		[in,out] uint32 *type,
		[in,out,size_is(*size),length_is(*length)] uint8 *data,
		[in,out] uint32 *size,
		[in,out] uint32 *length
	);

The problem is that pidl in its current form cannot handle size_is()
and length_is() for variables that occur after the array in the
structure. I've got a prototype of a fix for this, and will commit
once I have it fully working (it gets quite complex).

I have tested QueryValue with a hacked up version of my prototype and
it works fine. As it gets rid of all the unknown variables, and makes
the IDL much simpler I suspect its right.

Note that "data" is an [in] variable in the new IDL. This is pointless
of course, but it is common in Microsoft IDL, and explains the unknown
fields.

Cheers, Tridge


More information about the samba-technical mailing list