2.5.3.13. build_GetExeCodeOffset()
[<<<] [>>>]
This function checks that the actually running exe contains the binary BASIC program
attached to its end. It returns zero if not, otherwise it returns 1.
- The argument pszInterpreter should be argv[0] thus the code can open the executable
file and check if it is really contains the BASIC code
- plOffset should point to a long variable ready to recieve the file offset where the BASIC
code starts
- plEOFfset should point to a long variable ready to receive the file offset where the
BASIC code finishes. This is the position of the last byte belonging to the BASIC code, thus if
ftell(fp) > *plEOFfset means the file pointer is after the code and should treat it as EOF
condition when reading the BASIC program code.
It is guaranteed that both *plOffset and *plEOFfset will be set to 0 (zero) if the file
proves to be a standard BASIC interpreter without appended BASIC code.
int build_GetExeCodeOffset(char *pszInterpreter,
long *plOffset,
long *plEOFfset
){
[<<<] [>>>]