31 Aug
2022
31 Aug
'22
5:07 p.m.
Francois Gouget <fgouget(a)free.fr> wrote:
I would expect all these property getters to work the same way. So would something like that make more sense?
hr = IPrincipal_get_UserId(principal, &bstr); if (hr == S_OK && bstr) { hr = write_text_value(stream, L"UserId", bstr);
I'd guess the check is supposed to avoid writing an empty UserId, and apparently the check for bstr being NULL is not enough. I don't recall why writing empty UserId is different from other property values. -- Dmitry.