THandle = CREATETHREAD (0, 0 ,sched_ServerThread ,IntegerParameter ,0 ,ThreadID)
Once the thread has started, the "sched_serverThread" subroutine is executed
In this subroutine, the supplied parameter (SystemNum defined as Integer*4) has an"undefined address", thus causing a few poblems in the subsequent code.
I presume I am doing something obviously incorrect?
Thanks for the attempt, but I seem to have a few problems implementing your solution.
I did change the subroutine to Integer function, thentried to compile with the supplied interface. The compiler finds that the SystemNum variable isfound to have been defined more than once with conflicting attributes. Commenting out the Pointer defintion had no effect.
It seems to me that the stdcall attribute would be used to interface to a C routine (which this is not) and that therefore the Alias clause should refer to the C alias to the fortran function (the C routine does not exist).
With that in mind I changed the Interface defintion to exclude the atttributes stdcall defintion. It then compiled OK, but failed to have any affect on the original problem.