Search code examples
c++cvisual-studioincludedocumentation

Microsoft headers have no comments on declarations so where is the documentation?


Typically (as far as I know), in Visual Stdio I often right-click on a function "go to definition" or "go to declaration" with open source libraries. This leads me to the header files where I usually find a lot of documentation about the specific functions. If I try this with functions from Microsoft-headers, I get just some strange code, but no documentation about that function.

For example if I choose "go to declaration" with printf, I get this:

_Check_return_opt_
    _CRT_STDIO_INLINE int __CRTDECL printf(
        _In_z_ _Printf_format_string_ char const* const _Format,
        ...)

Do I miss something here? Does there exist another way? Where do you to look up these things?


Solution

  • The Microsoft code is not self-documenting in this way. They're not intended to be read by mere mortals. That's just a choice that was made by the developers. Different projects take different approaches to documentation. Some sprinkle comments liberally, others write out-of-band documentation (such as on Microsoft Docs), and some don't bother providing any at all!

    For Windows stuff I will typically Google e.g. printf visual studio.