pidl [in,out] helpers
Sam Liddicott
sam at liddicott.com
Thu Oct 1 06:45:39 MDT 2009
* Sam Liddicott wrote, On 22/09/09 08:34:
> Having done some more reading, it seems that for [ref] pointers, there
> should be no difference in the marshalling code between:
>
> [out,ref] int count;
> and
> [out,ref] int *count;
>
> so I'll try something at the pre-processor level, perhaps #define-ing a
> macro to * unless pidl is being used.
>
> I'll let you know how it goes.
I can confirm that it works fine:
#ifdef __midl
#define VALUE *
#define VALUE_REF ,ref
#else
#define VALUE
#define VALUE_REF
#endif
int something(
[in] in_arg,
[out VALUE_REF] int VALUE out_arg
);
pidl handles a non-pointer out value which is marshalled compatible with
midl which produces what we would recognize as Samba3 style stub functions.
I was able to marshal a function and arguments from windows to samba and
back with complete success.
So no need at all for pidl internal nastyness.
Sam
More information about the samba-technical
mailing list