In some of the IDL I work with I have noticed that there are 2 conventions for marking return values in methods - [in, out]
and [out, retval]
.
It appears that [in, out]
is used when there are multiple return values, for example:
HRESULT MyMethod(
[in] long InputParam,
[in, out] long* OutputParam1,
[in, out] long* OutputParam2
);
It appears that [out, retval]
is used when there is only a single return value, for example:
HRESULT MyMethod2(
[in] long InputParam,
[out, retval] long* OutputParam1
);
Is this a COM IDL convention or just a convention in the code I am working with?
Is there a functional difference in the code that will be generated from the 2 notations, or are they completely interchangeable?