At 06:40 PM 30/08/2001 +0200, you wrote:
Gerard Patel wrote:
As DestroyWindow does a lot of handle comparaisons, it is necessary to give it a real 32 bit handle. This avoids a systematic crash when ForteFreeAgent 16 bit exits. I have not looked for other places where this can be necessary - but it would not be surprising that this happens.
perhaps as an extension of the relay code ? (it would mean typing correctly windows handles in spec files though)
What do you mean by typing ? There is no hwnd type in the spec files, AFAICT. That's not a matter of typing GetWindow(hwnd word) instead of GetWindow(word word) - I think it is necessary to actually change winebuild to define a new type and write a bunch of code to support it.
I have looked at the points where it current cvs crashes and it's necessary to fix 16 to 32 bits handles and I have found that 2 changes cure all my new crashes : the one in DestroyWindow16 and another in DefWindowProc16
The reason for these problems is the same : Wine is keeping window handles in several variables (active window, focus window) and Wine code does several comparisons between applications provided handles and these values. In the last case for example, the test
/* activate hwndTop if needed. */ if (hwndTop != GetActiveWindow()) { in focus.c fails because of the high word part (and creates an infinite focus loop)
I'd say that by adding also handle fixes in SetWindowPos16, SetFocus16 and SetActiveWindow16 as well as fixing the handles setters in queue.c, everything would be covered.
IMO your solution is
1) somewhat complex for a fix to apps not widely used anymore
2) overkill because it's not necessary to convert window handles for each and every Api.
OTOH your solution is more elegant.
I don't know what to do.
Gerard