On Wed Mar 8 18:43:23 2023 +0000, Florian Will wrote:
I'm not sure, I implemented this by just reading the online docs that say it might return -1 on error, so I thought I should check that case. Looking at wine's implementation, it might fail when `ImageList_Create` fails because of an allocation failure e.g. in `ImageListImpl_CreateInstance` or `CreateCompatibleDC`? I'm not quite sure how the control flow works in `TOOLBAR_AddBitmap` when using the standard icon sets. Now that you mention it, the other SendMessageW has no error check. I guess failure is extremely unlikely here, so if it's okay to ignore, I'd be happy to drop that error handling. :-)
Given that the only thing we can do is silently ignore it anyway, and failure is not expected, I think it's not worth checking.