Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #70699 > unrolled thread

What is | in a sub call?

Started byT <T@invalid.invalid>
First post2019-12-27 13:36 -0800
Last post2020-01-02 16:07 -0800
Articles 7 — 4 participants

Back to article view | Back to comp.lang.c++


Contents

  What is | in a sub call? T <T@invalid.invalid> - 2019-12-27 13:36 -0800
    Re: What is | in a sub call? Ian Collins <ian-news@hotmail.com> - 2019-12-28 10:42 +1300
      Re: What is | in a sub call? T <T@invalid.invalid> - 2019-12-27 13:56 -0800
    Re: What is | in a sub call? red floyd <no.spam@its.invalid> - 2019-12-27 15:36 -0800
      Re: What is | in a sub call? T <T@invalid.invalid> - 2019-12-27 16:43 -0800
      Re: What is | in a sub call? James Kuyper <jameskuyper@alumni.caltech.edu> - 2019-12-27 20:52 -0500
        Re: What is | in a sub call? red floyd <no.spam@its.invalid> - 2020-01-02 16:07 -0800

#70699 — What is | in a sub call?

FromT <T@invalid.invalid>
Date2019-12-27 13:36 -0800
SubjectWhat is | in a sub call?
Message-ID<qu5thi$n7g$1@dont-email.me>
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

[toc] | [next] | [standalone]


#70701

FromIan Collins <ian-news@hotmail.com>
Date2019-12-28 10:42 +1300
Message-ID<h6nc5mFctnvU4@mid.individual.net>
In reply to#70699
On 28/12/2019 10:36, T wrote:
> 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?

Yes.

-- 
Ian.

[toc] | [prev] | [next] | [standalone]


#70704

FromT <T@invalid.invalid>
Date2019-12-27 13:56 -0800
Message-ID<qu5umn$7lm$3@dont-email.me>
In reply to#70701
On 2019-12-27 13:42, Ian Collins wrote:
> On 28/12/2019 10:36, T wrote:
>> 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?
> 
> Yes.
> 


Thank you!

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

[toc] | [prev] | [next] | [standalone]


#70710

Fromred floyd <no.spam@its.invalid>
Date2019-12-27 15:36 -0800
Message-ID<qu64im$qnh$2@redfloyd.dont-email.me>
In reply to#70699
On 12/27/19 1:36 PM, T wrote:
> 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

Please take your windows question to a windows group.  This group is
for discussing the C++ language as defined by ISO 14882.

[toc] | [prev] | [next] | [standalone]


#70712

FromT <T@invalid.invalid>
Date2019-12-27 16:43 -0800
Message-ID<qu68fg$cfh$1@dont-email.me>
In reply to#70710
On 2019-12-27 15:36, red floyd wrote:
> On 12/27/19 1:36 PM, T wrote:
>> 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
> 
> Please take your windows question to a windows group.  This group is
> for discussing the C++ language as defined by ISO 14882.

Red,

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

-T

[toc] | [prev] | [next] | [standalone]


#70715

FromJames Kuyper <jameskuyper@alumni.caltech.edu>
Date2019-12-27 20:52 -0500
Message-ID<qu6chg$sa9$2@dont-email.me>
In reply to#70710
On 12/27/19 6:36 PM, red floyd wrote:
> On 12/27/19 1:36 PM, T wrote:
>> 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
> 
> Please take your windows question to a windows group.  This group is
> for discussing the C++ language as defined by ISO 14882.

The meaning of "|" in that context is a C++ question, not a windows
question.

[toc] | [prev] | [next] | [standalone]


#70987

Fromred floyd <no.spam@its.invalid>
Date2020-01-02 16:07 -0800
Message-ID<qum0jo$l0a$1@redfloyd.dont-email.me>
In reply to#70715
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.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.c++


csiph-web