Alexander Shaposhnikov

How do I handle such situation correctly?

How do I handle such situation correctly?

I agree that using GetBuffer() when reading is not pretty. However, original code almost never copied the arrays themselves and passed that local arrays around. Perhaps I don't need to copy them?

I agree that using GetBuffer() when reading is not pretty.
However, original code almost never copied the arrays themselves and passed that local arrays around.
Perhaps I don't need to copy them?

The reason I did use GetBuffer() is that some functions require LPWSTR and I did not want to use const_cast<LPWSTR>(). So you say casting is better?

The reason I did use GetBuffer() is that some functions require LPWSTR and I did not want to use const_cast<LPWSTR>().
So you say casting is better?

Pointless check (removed already)

Pointless check (removed already)

I've just marked them for myself. Like "these were macros, refactor it please" https://code.reactos.org/static/olpro3/2static/images/wiki/icons/emoticons/tongue.gif

I've just marked them for myself. Like "these were macros, refactor it please"

Thank you guys for reviews, everything noted.

Thank you guys for reviews, everything noted.

I guess this is even UNICODE_NULL

I guess this is even UNICODE_NULL

Hmm, I just prefer to instantly see how the right check relates to the left one.

Hmm, I just prefer to instantly see how the right check relates to the left one.

Definetly length. I plan to replace a C array by ATL::CSimpleArray to avoid such constants.

Definetly length. I plan to replace a C array by ATL::CSimpleArray to avoid such constants.

Thats what I've seen in current entries and in my expericence. The majority of version formats are using a, b, c as suffix. Although there can be -alpha, -beta, never seen such in the registry.

Thats what I've seen in current entries and in my expericence. The majority of version formats are using a, b, c as suffix.
Although there can be -alpha, -beta, never seen such in the registry.

It was fixed in 75241 EDIT: It has not, it was winmain.cpp

It was fixed in 75241
EDIT: It has not, it was winmain.cpp

Whoops. This should be after the loop on line 596.

Whoops. This should be after the loop on line 596.

Ah, perfect. Maybe replace other string buffers with CString? It seems they're almost always 260 bytes.

Ah, perfect. Maybe replace other string buffers with CString?
It seems they're almost always 260 bytes.

Just to stop IntelliSense from complaining.

Just to stop IntelliSense from complaining.

Yeah, that was copied from the past https://code.reactos.org/static/olpro3/2static/images/wiki/icons/emoticons/smile.gif Line 1200 to be exact.

Yeah, that was copied from the past
Line 1200 to be exact.

Former function does not set b[0] to NULL.

Former function does not set b[0] to NULL.

It actually works that way. It may be better to define it here though.

It actually works that way. It may be better to define it here though.