http://bugs.winehq.org/show_bug.cgi?id=10528
Louis Lenders xerox_xerox2000@yahoo.co.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |xerox_xerox2000@yahoo.co.uk Component|wine-misc |wine-user
--- Comment #2 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2007-11-22 02:06:27 --- Hi, i did a bit of testing with this application. For now there seem to be 2 bugs:
1. The file open dialog makes the application hang
2. I couldn't open the sample file, it just didn't show the file
1. The first bug seems to be caused by: 0009:Call user32.SetDlgItemTextW(0002002e,00000480,001a4450 L"
"...) ret=780512c7
An extremely large string, only filled with spaces, is passed into SetDlgItemTextW. I don't know if this is because of another bug in wine, or because of a bug in the app. The size of the string is 59000 bytes! With a stupid hack like below, it's easily to work around the bug.
2. After that, the sample file still wouldn't open. Using native atl.dll worked around that bug. Then the application seems to be functional further.
Hack: diff --git a/dlls/user32/dialog.c b/dlls/user32/dialog.c index d04226b..e7c267d 100644 --- a/dlls/user32/dialog.c +++ b/dlls/user32/dialog.c @@ -1287,8 +1287,8 @@ BOOL WINAPI SetDlgItemTextA( HWND hwnd, INT id, LPCSTR lpString ) * SetDlgItemTextW (USER32.@) */ BOOL WINAPI SetDlgItemTextW( HWND hwnd, INT id, LPCWSTR lpString ) -{ - return SendDlgItemMessageW( hwnd, id, WM_SETTEXT, 0, (LPARAM)lpString ); +{ if(strlenW(lpString) > 10000) lpString = 0; + return (BOOL)SendDlgItemMessageW( hwnd, id, WM_SETTEXT, 0, (LPARAM)lpString ); }