program will be terminated immediately

Started by Rudolf Furstauer, January 12, 2010, 05:23:21 PM

Previous topic - Next topic

Rudolf Furstauer

Hi Paul,

please can you tell me how can I get the following error:

I have a project where I worked until yesterday without any problem.
Today I made some small changes, and now I can not start the project.exe.

I can compile the project without error and it will create a new project.exe.
When I run the project.exe, the program will immediately quit again,
without a dialog is displayed.

The following part of the program is reached:
Function FF_WINMAIN( ByVal hInstance     As Dword, _
                     ByVal hPrevInstance As Dword, _
                     ByVal lpCmdLine     As Asciiz Ptr, _
                     ByVal iCmdShow      As Long ) As Long
    Local ovi As OSVERSIONINFO
'-------------------------------------

        MsgBox "FF_WINMAIN"        ' I get the Messagebox
        hInstMain = hInstance
        Function = %False

End Function


But I can not reach WM_CREATE in the startup Form:
'--------------------------------------------------------------------------------
Function FRMHMIMAIN_WM_CREATE ( _
                           hWndForm As Dword, _      ' handle of Form
                           ByVal UserData As Long _  ' optional user defined Long value
                           ) As Long

    Local lZeiger     As Long
    Local lRetVal     As Long 
'----------------------------------------------------------------
    MsgBox "FRMHMIMAIN_WM_CREATE"   ' I don't get the Messagebox  !!

End Function

If I set #Debug Error ON, the program runs without any problems.
There is also no error message regarding array boundary or pointer.

Which part of the program runs between FF_WINMAIN and WM_CREATE????????

Thanks for any help!


Rudolf Fürstauer

Paul Squires

Some notification messages will fire prior to WM_CREATE message handler. For example, EN_CHANGE and EN_UPDATE for TextBoxes and TVN_SELCHANGED and TVN_SELCHANGING for TreeViews. Maybe one of them are firing for one of your controls on your form.

Try commenting out all code in the form except for the WM_CREATE and then progressively uncomment routines until the GPF shows itself again.
Paul Squires
PlanetSquires Software

Rudolf Furstauer

Thanks Paul for your help.

80% of computer problems, are 60cm away from the monitor.   ;D

TVN_SELCHANGING was the cause.

Rudolf Fuerstauer