Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

What is | in a sub call?

31 views
Skip to first unread message

T

unread,
Dec 27, 2019, 4:36:58 PM12/27/19
to
Hi All,

https://stackoverflow.com/questions/1387064/how-to-get-the-error-message-from-the-error-code-returned-by-getlasterror

size_t size = FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
NULL, errorMessageID,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPSTR)&messageBuffer, 0, NULL);


What is the | do in

FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS

?

Is it bitwise OR'ing the three constants?


Many thanks,
-T

Ian Collins

unread,
Dec 27, 2019, 4:42:23 PM12/27/19
to
Yes.

--
Ian.

T

unread,
Dec 27, 2019, 4:56:47 PM12/27/19
to
Thank you!

I was channeling Bash and thought they were being
pipped to each other. Chuckle!


red floyd

unread,
Dec 27, 2019, 6:37:00 PM12/27/19
to
Please take your windows question to a windows group. This group is
for discussing the C++ language as defined by ISO 14882.

T

unread,
Dec 27, 2019, 7:43:35 PM12/27/19
to
Red,

Read my question a little more closely. That was a C++
question

-T

James Kuyper

unread,
Dec 27, 2019, 8:52:56 PM12/27/19
to
The meaning of "|" in that context is a C++ question, not a windows
question.

red floyd

unread,
Jan 2, 2020, 7:07:29 PM1/2/20
to
On 12/27/19 5:52 PM, James Kuyper wrote:
> [conversation redacted]
>
> The meaning of "|" in that context is a C++ question, not a windows
> question.
>

You are correct. My mistake. I had had a very bad week.
I apologize.


0 new messages