Fix size_is description when the parameter is out

When the argument using to describe size_is is an out parameter, we
don't know it's value and it cannot be used to describe the size of
another parameter. That's why in that case we can only set a max range
This commit is contained in:
1orenz0 2018-04-25 20:33:57 +02:00
parent 13b5819f56
commit 39ded8c54d
1 changed files with 19 additions and 1 deletions

View File

@ -597,7 +597,25 @@ BOOL __fastcall processCorrelationDescriptorNaked(
{
case FC_DEREFERENCE:
// the correlation item describing the size of the current item
// can derive from an out parameter. In that case, we can only set it
// has a max range and not the exact size since it's not known before the call.
// Ex :
// HRESULT Proc0 (
// [in] int arg1,
// [out] int *arg2,
// [out][size_is( , *arg2)] int **arg2
// );
if (paramDesc.isOut())
{
oss << ", *" << strCorrelationItem;
}
else
{
oss << "*" << strCorrelationItem;
}
break;
case FC_ADD_1: