We recommend using Visual Studio 2017

C6103

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at C6103.

warning C6103: Returning <variable> from failed function call at line <location>.

A successful path through the function is returning a variable that was used as an _Out_ parameter to an internal function call that failed.

The problem might be that the called function and the calling function are not completely annotated. The called function may require _Always_, _Outptr_result_nullonfailure_ (_COM_Outptr_ for COM code), or a related annotation, and the calling function may require a _Success_ annotation. Another possible cause for this warning is that the _Success_ annotation on the called function is incorrect.

Using SAL Annotations to Reduce C/C++ Code Defects

Show: