A program hangs up after Dialog closing

A program hangs up after Dialog closing

Hello gentlemen!
Could anybody help me to understand why the following little program stops (or hangs up) after closing dialog box and printingthe text 'TYPE ANY STRING AND PRESS '?
The program has been compilled via 30-days
Intel Visual Fortran Composer XE 2011 Integration for Microsoft Visual Studio* 2008,
Thanks

USE IFLOGM; USE IFQWIN
IMPLICIT NONE
INCLUDE 'RESOURCE.FD'
TYPE (DIALOG) DLG_1
LOGICAL*4 STATUS_L4
INTEGER*4 STATUS_I4
INTEGER*2 STATUS_I2
CHARACTER*120 T

STATUS_I4=SetExitQQ(QWIN$EXITNOPERSIST)

OPEN (1, FILE='USER')
WRITE (1,*) 'TYPE ANY STRING AND PRESS '; READ (1,*) T; WRITE (1,*) ' '

STATUS_L4=DLGINIT (DIAL, DLG_1)
STATUS_I4=DLGMODAL(DLG_1)
WRITE (1,*) 'DLGMODAL(DLG_1)=/=-1'; WRITE (1,*) STATUS_I4; WRITE (1,*) ' '
CALL DLGUNINIT (DLG_1)

STATUS_I4=SETACTIVEQQ(1)
WRITE (1,*) 'SETACTIVEQQ(1)=1'; WRITE (1,*) STATUS_I4; WRITE (1,*) ' '
STATUS_I4=FOCUSQQ(1)
WRITE (1,*) 'FOCUSQQ(1)=0'; WRITE (1,*) STATUS_I4; WRITE (1,*) ' '

WRITE (1,*) 'TYPE ANY STRING AND PRESS '; READ (1,*) T; WRITE (1,*) ' '
WRITE (1,*) 'OK !!!'; CALL SLEEPQQ (1500)

STOP
END

5 posts / novo 0
Último post
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.

I don't see anything related to threading here. Perhaps the Windows Fortran forum might be more useful, but you may have to give a full example to reproduce the behavior you're questioning.

Thank you for answer and advice. Sorry, there isn't any threating here indeed. But I didn't know this question for who. Now I got the following message from my program during maybe executing the next instruction:

STATUS_I4=DLGMODAL(DLG_1)

fortrtl severe (157): Program Exeption - access violation
Image PC Routine Line Source
Qwin1.exe 0040CAEA Unknown Unknown
Qwin1.exe 00405231 Unknown Unknown

Anexos: 

AnexoTamanho
Download QWin1.zip1.02 MB

Thanks for attention. The problem has been solved.

Thank you for share information these information is very helpful and use ful for new users.

Deixar um comentário

Faça login para adicionar um comentário. Não é membro? Inscreva-se hoje mesmo!