Hello,
while porting a GUI application from 32 to 64 bit we run into problems concerning the Help sytem wich makes use of hypertext windows. As I can't easily create a code example which shows the problem I try to describe it.
We have linked the Help system to pressing key F1 which results in calling callback F1_func. Now F1_func does one of the actions following Action1:
if the hypertext main window has not yet been created then the hypertext main window is created; this is done by calling winio@( ... %hd ...); the handle of the hypertext main window may be retrieved by means of call winio@(...%hw ...); assume this handle to be named IHANDLE for the following;
Action 2:
if the hypertext main window exists then the contents of the hypertext main window is changed; this is done by calling chage_hypertext@(IHANDLE, ...);
Note that in terms of IHANDLE action 1 is carried out if IHANDLE equals 0 and action 2 is carried out if IHANDLE is different from 0. Now we look at the following scenario:
Open the GUI application;
press F1 to open the hypertext main window
close the hypertext main window using the close box from the decoration of the hypertext main window;
press F1 to open the hypertext main window once again
For the 32 bit version of our application the hypertext main window is opened once again, however, for the 64 bit version error 'no hypertext control found' is generated (from within function F1_func). Here are some observations we made: at the beginning of the second call of F1_func variable IHANDLE is 0 for the 32 bit version and hence makes F1_func execute the first action mentioned above. For the 64 bit version, however, variable IHANDLE is different from 0 at the beginning of the second call of F1_func. Hence F1_func tries to execute the second action mentioned above and runs in the error mentioned. Note that IHANDLE is of type integer4 for the 32 bit version and of type integer8 for the 64 bit version and that both are defined in a common block. We suspect that the system/'hypertext machinery' sets IHANDLE to 0 for the 32 bit version and that this does not work correctly for the 64 bit version. If, for the 64 bit version we define two more variales of type integer*4, namely I4A and I4B, and if we append them to the common block where IHANDLE is located, then we may execute statement
EQUIVALENCE(IHANDLE,I4A)
We see that one of variables I4A, I4B is 0 and the other different from 0. That's why we think that closing the main hypertext window erroneosly does not result in IHANDLE to be set to 0 for the 64 bit version.
We would appreciate any help.
Regards, Dietmar