Re: user32: fix return value in DialogBoxParamA if no resource can befound + simple test
24 Dec
2006
24 Dec
'06
7:54 a.m.
Louis. Lenders <xerox_xerox2000(a)yahoo.co.uk> wrote:
--- a/dlls/user32/dialog.c +++ b/dlls/user32/dialog.c @@ -800,7 +800,12 @@ INT_PTR WINAPI DialogBoxParamA( HINSTANC HRSRC hrsrc; LPCDLGTEMPLATEA ptr;
- if (!(hrsrc = FindResourceA( hInst, name, (LPSTR)RT_DIALOG ))) return 0; + if (!(hrsrc = FindResourceA( hInst, name, (LPSTR)RT_DIALOG ))) + { + SetLastError(ERROR_RESOURCE_NAME_NOT_FOUND); + ERR("FindResource %s failed, returning -1\n",debugstr_a(name)); + return -1; + }
Most likely the last error should be set by FindResource itself, not a more high level DialogBoxParam call. If that's not the case it should be fixed there. -- Dmitry.
6939
Age (days ago)
6939
Last active (days ago)
0 comments
1 participants
participants (1)
-
Dmitry Timoshkov