Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29285 Discussions

How to determine difference in project setup

sumitm
Beginner
661 Views
Hi,
I have two identical Quickwin programs that I upgraded from Fortran 10 to XE Update 10, 12.1.353

There is a dialog box section where I use a listbox to populate all the files of a particular type in a browsed to directory. In one version it works and in the other version with exactly the same code it does not populate that list box.

As a history, earlier when I was in Windows XP and version 10 of the IVF, I had to use a StackReserveSize="160000000" StackCommitSize="160000000" for the program to launch. The XP compiled version would not work in Win 7 as it would freeze anytime I called the the browse command. In win7 I had to delete the StackSize restriction and recompile and it would work.

However now in win7 one version works perfectly and the other does not. I did a compareIT of the two vfproj files and made it identical to the one that works. Still no luck. Anyone has any ideas as to what else could be different .

The vfproj file contents is given below



The code for file browsing is identical in both projects
Thanks


Sumit

0 Kudos
2 Replies
Steven_L_Intel1
Employee
661 Views
Do you have any calls to GetForegroundWindow() in the code? If so, try replacing them with NULL.
0 Kudos
sumitm
Beginner
661 Views
Steve,
No I do not have any calls to that . The piece of code that is not working on one project and working fine in the otheris

[bash]SUBROUTINE INPFILEDXF(DLG, ID, CALLBACKTYPE) USE IFCORE use IFPORT use IFQWIN USE INPUTINFO USE IFWINTY USE IFWIN use iflogm IMPLICIT NONE INCLUDE 'RESOURCE.FD' TYPE(DIALOG)DLG INTEGER(KIND=4)ID, CALLBACKTYPE TYPE (T_OPENFILENAME)FRED LOGICAL(KIND=4)RET INTEGER(KIND=4)IERROR,LENGTH Integer i CHARACTER(LEN=26*7)ALLFILTERS CHARACTER(LEN=60)DLGTITLE LOGICAL(KIND=4)CHECKED logical retlog character(256) checkstring character(10) text !CALL UNUSEDQQ(ID,CALLBACKTYPE) CALL ZeroMemory(LOC(FRED), SIZEOF(FRED)) ALLFILTERS = 'DXF CAD FILES(*.dxf)' // char(0) // & '*.dxf' // char(0) // & 'All files(*.*)' // char(0) // & '*.*' // char(0) // char(0) DLGTITLE = 'Choose DXF File'C FRED%LSTRUCTSIZE = sizeof(FRED) !+12 DXF_INP=trim(DXF_INP)//char(0) FRED%HWNDOWNER = NULL FRED%HINSTANCE = NULL FRED%LPSTRFILTER = LOC(ALLFILTERS) FRED%LPSTRCUSTOMFILTER = NULL FRED%NMAXCUSTFILTER = NULL FRED%NFILTERINDEX = 1 FRED%LPSTRFILE = LOC(DXF_INP) FRED%NMAXFILE = LEN(DXF_INP) FRED%LPSTRFILETITLE = NULL FRED%NMAXFILETITLE = NULL FRED%LPSTRINITIALDIR = NULL FRED%LPSTRTITLE = LOC(DLGTITLE) FRED%FLAGS = NULL !OFN_FILEMUSTEXIST + OFN_PATHMUSTEXIST + OFN_EXPLORER FRED%NFILEOFFSET = NULL FRED%NFILEEXTENSION = NULL FRED%LPSTRDEFEXT = NULL FRED%LCUSTDATA = NULL FRED%LPFNHOOK = NULL FRED%LPTEMPLATENAME = NULL RET = GETOPENFILENAME(FRED) CALL COMDLGER(IERROR) DXF_FILE_INP = .FALSE. IF(RET .AND. (IERROR == 0))THEN CALL READ_DXF write (text,'(I5)') Num_pts_Vert retlog =DlgSet (dlg, IDC_Num_pts,text) DXF_FILE_INP = .TRUE. ENDIF length = SPLITPATHQQ(dxf_INP, drive, dir, flname, ext) checkstring= trim(drive)//trim(dir)//'*.dxf' call SHOWPERMISSION(checkstring) retlog = DlgSet( dlg,IDC_DXF_LIST, num_of_files ) Do i=1,num_of_files retlog = DlgSet( dlg,IDC_DXF_LIST, flnm(i), i ) end do RETURN END SUBROUTINE INPFILEDXF[/bash]



and showpermission subroutine is

[bash] SUBROUTINE SHOWPERMISSION(files) ! USE DFLIB use inputinfo use ifport CHARACTER(256) files INTEGER(4) length !, handle INTEGER(KIND=INT_PTR_KIND( )) handle CHARACTER(5) permit TYPE (FILE$INFO) info num_of_files=0 length = len(files) !GETSTRQQ(files) handle = FILE$FIRST DO WHILE (.TRUE.) length = GETFILEINFOQQ(files, info, handle) IF ((handle .EQ. FILE$LAST) .OR. (handle .EQ. FILE$ERROR)) THEN SELECT CASE (GETLASTERRORQQ( )) CASE (ERR$NOMEM) WRITE (*,*) 'Out of memory' CASE (ERR$NOENT) EXIT CASE DEFAULT WRITE (*,*) 'Invalid file or path name' END SELECT END IF num_of_files=num_of_files+1 flnm(num_of_files)=info%name END DO RETURN END SUBROUTINE[/bash]
0 Kudos
Reply