Like Tree2Likes
  • 2 Post By Codeplug

_In_ , _In_opt_ , and _Out_ ?

This is a discussion on _In_ , _In_opt_ , and _Out_ ? within the Windows Programming forums, part of the Platform Specific Boards category; I've been learning the win32 api for about 2 weeks now, and every time I look in the documentation I ...

  1. #1
    Registered User Alpo's Avatar
    Join Date
    Apr 2014
    Posts
    374

    _In_ , _In_opt_ , and _Out_ ?

    I've been learning the win32 api for about 2 weeks now, and every time I look in the documentation I see these confusing qualifiers (?) before the parameter types in the definitions of functions.

    They aren't mentioned in the books/ tutorials I've read so far, and I can't even find mention of them on the internet (I don't know what they are called).

    Here is an example of a function with a good selection of the things:

    DWORD WINAPI FormatMessage(
    _In_ DWORD dwFlags,
    _In_opt_ LPCVOID lpSource,
    _In_ DWORD dwMessageId,
    _In_ DWORD dwLanguageId,
    _Out_ LPTSTR lpBuffer,
    _In_ DWORD nSize,
    _In_opt_ va_list *Arguments
    );


    Could someone help me here, are these _In_, _In_opt, _Out_, and such things something I should even pay attention to? What are they?

    Thanks, Alpo.

  2. #2

  3. #3
    Registered User Alpo's Avatar
    Join Date
    Apr 2014
    Posts
    374
    Quote Originally Posted by Codeplug View Post

    Thanks, I see where the names come from now. A bit different from what I was expecting, but it does make a sort of sense.

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21