C28205C28205
Ostrzeżenie C28205: funkcja>:
_Success_
lub_On_failure_
użyta w niedozwolonym kontekściewarning C28205: function> :_Success_
or_On_failure_
used in an illegal context
_Success_
_On_failure_
Adnotacje i mogą być używane tylko dla zwracanych wartości funkcji.The _Success_
and _On_failure_
annotations can only be used on function return values.
PrzykładyExamples
#include<sal.h>
// Oops, _Success_ is not valid in parameter lists, should be moved to return value.
bool GetValue( _Success_(return != false) _Out_ int *pInt, bool flag)
{
if(flag) {
*pInt = 5;
return true;
} else {
return false;
}
}
#include<sal.h>
_Success_(return != false)
bool GetValue(_Out_ int *pInt, bool flag)
{
if(flag) {
*pInt = 5;
return true;
} else {
return false;
}
}