This is an annotation. Shortly speaking,
__success(expr)
means it exprdescribes the conditions under which a function is considered successful. For functions that return HRESULT, this condition is that the return value (because it HRESULTis equal long) is non-negative. All functions that return HRESULTuse this annotation to them because of this typedef.
, , MSDN SAL , HRESULT Win32 .