Microsoft's SAL is an inline, source level API annotation language, commonly used to document WinAPI and various Microsoft projects.
Microsoft's source-code annotation language or SAL provides an inline method to document source level API functions via the use of macro's, provided by the sal.h
header.
These macro's are used to decorate function arguments and return types, providing an indication of various properties, such as optionality, null-termination or buffer size. The following is an example of the SAL annotations in use (taken from MSDN):
void MyPaintingFunction(
__in HWND hwndControl, // An initialized read-only parameter.
__in_opt HDC hdcOptional, // An initialized read-only parameter
// that might be NULL.
__inout IPropertyStore *ppsStore // An initialized parameter that
// may be freeely used and modified.
);
As of Visual Studio 2008, the macro's are now standardized to use a capital.