"Louis. Lenders" xerox_xerox2000@yahoo.co.uk wrote:
As Dmitry Timoshkov (thanks for that) the SetLastError was not necessary. Here's updated patch.
Probably the problem is that you need also handle both FindResourceW and LoadResource failures the same way by returning -1, and change 'return -1;' later to 'return 0;' (for invalid parent) as MSDN suggests. All that needs to be tested as well. Also DialogBoxParamW needs to be fixed as well.
Probably other dialaog APIs (like DialogBoxIndirectParamAorW) need a review regarding that.