The first parameter is OK for the integer.
? 1795698358 > 2^32
>>Did you check parameter values at the time of error? Are you using the latest version of the components?
>
>Thanks Sergey for the response. I haven't troubled you for quite some with my issues :)
>
>The parameters comes up as follows for 4 calls when the app starts
>
>The parameters as in the VFP IDE (no errors)
>Call 1: 4411862, 2034914, 528, 1, 1903924
>Call 2: 4411862, 2034914, 528, 2, 1903924
>Call 3: 4411862, 2034914, 528, 1, 1510274
>Call 4: 4411862, 2034914, 528, 2, 1510274
>
>The parameters as in the EXE (error generated)
>Call 1: 1795698358, 2559284, 528, 1, 2165986
>Call 2: 1795698358, 2559284, 528, 2, 2165986
>Call 3: 1795698358, 2559284, 528, 1, 30383264
>Call 4: 1795698358, 2559284, 528, 2, 30383264
>
>I may be wrong but is the 1st parameter value too big for an Integer?
>I tried to change the first parameter to the API DECLARE to Long but it did not matter.
>
>Please advise.
>
>Thanks.
>
>>
>>>
>>>I get the following error when I run the application as an exe, but does not happen when I run the same application in a VFP IDE neither as an exe or DO main:
>>>
Error#: 2027
>>>Message: Declare DLL call caused an exception
>>>Line#: 11
>>>Method: _msghandler
>>>
>>>In VFPx.vcx bindwindowseventsproxy._msghandler
>>>
...
>>>If Isnull(This._Result) Then
>>> m.lnResult = apiCallWindowProc(This._WindowProc, m.HWnd, m.Msg, m.wParam, m.lParam)
>>>Else
>>>...
>>>
>>>It is defined twice (if it matters) in ctl32_api.prg
>>>
Function apiCallWindowProc
>>> Lparameters lpPrevWndFunc, nhWnd, Msg, wParam, Lparam
>>> Declare Integer CallWindowProc In win32api As apiCallWindowProc ;
>>> Integer lpPrevWndFunc, ;
>>> Integer nhWnd, ;
>>> Integer msg, ;
>>> Integer wParam, ;
>>> Integer Lparam
>>> Return apiCallWindowProc(m.lpPrevWndFunc, m.nhWnd, m.Msg, m.wParam, m.lParam)
>>>Endfunc
>>>
>>>and in VFPx.vcx bindwindowseventsproxy.init()
>>>
Declare Integer CallWindowProc In win32api As apiCallWindowProc ;
>>> Integer lpPrevWndFunc, ;
>>> Integer HWnd, ;
>>> Integer Msg,;
>>> Integer wParam,;
>>> Integer Lparam
>>>
>>>I don't know how to handle this error that happens only in the exe.
>>>
>>>Please advise.
If it's not broken, fix it until it is.
My Blog