What does this macro do? __success (return> = 0) long

In the Windows header file, WinNT.h HRESULT is defined as follows:

typedef __success(return >= 0) long HRESULT;

After some research, I found out that the __success macro is part of the Microsoft SAL source code annotation language and is defined in sal.h. But for my life, I can’t understand what she does and how she does it.

Thanks in advance.

Todd

+3
source share
1 answer

This MSDN blog post explains what it means __success: it indicates that the function completed successfully if it returns the value HRESULT= 0.

- - - , "", , .

+5

Source: https://habr.com/ru/post/1774765/


All Articles