We are trying to port the Salford clearwin online help mechanism of a Salford 32 bit Fortran application to 64 bit using Intel Fortran Compiler ifort, version 11.1, for compilation, xilink for linking and resource compilers src.exe and rc from the Intel 64 bit compile environment.
We use the following application browse.for which is based on a Salford demo application written in C.
PROGRAM FACTOR
#ifdef INTEL64
use mswin$
USE IFWIN
USE CLRWIN$
#endif
IMPLICIT NONE
#ifndef INTEL64
INCLUDE <WINDOWS.INS>
#endif
INTEGER rwinio
#ifdef INTEL64
CALL ADD_HYPERTEXT_RESOURCE$('TEXT')
rwinio=winio$('%mi[BROWSE]&');
rwinio=winio$(
* '%ca[ClearWin Browser]%mn[&File[E&xit],&Back,&History]&',
* 'EXIT','PREVIOUS_TEXT','TEXT_HISTORY')
rwinio=winio$('%bg[grey]%ww%pv%70.20ht@','INTRODUCTION')
#else
CALL ADD_HYPERTEXT_RESOURCE@('TEXT')
rwinio=winio@('%mi[BROWSE]&');
rwinio=winio@(
* '%ca[ClearWin Browser]%mn[&File[E&xit],&Back,&History]&',
* 'EXIT','PREVIOUS_TEXT','TEXT_HISTORY')
rwinio=winio@('%bg[grey]%ww%pv%70.20ht@','INTRODUCTION')
#endif
END
The code of file browse.for to be compiled depends on define INTEL64 which is set in the compile step to produce the intel code; if define INTEL64 is not set in the compile step then the code is meant for the 32 bit Salford scenario. Using resource file browse_ctrls.rc
TEXT HYPERTEXT browse.htm
run BITMAP run.bmp
BROWSE ICON browse.ico
and compiling it to object file browse_ctrls.obj we can link a 32 bit application browse.exe using the Salford compile environment and a 64 bit application browse.exe using the Intel 64 bit compile enviroment and Salford's clearwin64.dll.
The code makes use of a hypertext file browse.htm which supplies the texts etc. used in the help file. The hypertext file is integrated into the final executable by means of the resource compiler which generates an object file against which the final executable is linked.
For the 32 bit scenario we use Salford's resource compiler src.exe whereas for the 64 bit scenario we use the resource compiler from the INTEL64 build environment.
Application browse.exe creates a menu bar consisting of menus 'File', 'Back' and 'History'. The latter two menus provide the functionality to navigate through the help texts.
This works pretty well and as expected for both the 32 bit version and the 64 bit version with the exception of the history menu in the 64 bit case. Clicking the history menu makes the 32 bit application display a window used to navigate through the help themes. However, when clicking the
history menu in the 64 bit case, then the application crashes displaying the information window 'ClearWin+ error'
Argument no 8 of winio
should be a list-box call-back function - not string 'H*f*i(H...'
Here ... is a string containing some 'strange' characters.
I suspect the problem might be the resource compilers. For the 32 bit scenario we use command
src browse_ctrls /binary SALFORD\browse_ctrls.obj
for the 64 bit scenario we use command
C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\bin\win64\amd64\rc.exe
/fo INTEL64\debug\browse_ctrls.obj browse_ctrls
. Any comments are welcome.
Dietmar