Hello Jonas, Wednesday, December 28, 2011, 2:43:16 PM, you wrote:
JM> The most likely problem is memory corruption by your program. [...] JM> give more accurate diagnostics). A bit more information: Environment is win32. The line that raises the exception is in win32callback.inc 2474: ------------------------------------------- if (Msg=WM_CHAR) and (WParam=VK_RETURN) and ((lWinControl is TCustomCombobox) or ((lWinControl is TCustomEdit) and not (lWinControl is TCustomMemo )) ) then // this thing will beep, don't call defaultWindowProc else PLMsg^.Result := CallDefaultWindowProc(Window, Msg, WParam, LParam); ------------------------------------------- The CallDefaultWindowProc. If I change the line to: try PLMsg^.Result := CallDefaultWindowProc(Window, Msg, WParam, LParam); finally end; The problem dissapears. * In the same function, if I declare an ansistring type, just the declare only, it works. * If the "CallDefaultWindowProc" declaration is changed to stdcall it also works fine. -- Best regards, José _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel