You must follow these rules when developing your ESL for Windows local application:
•Do not call the following STDIO stream functions and macros:
printf scanf getchar putchar gets
•Do not specify the following file handles or streams when calling C low-level I/O functions or STDIO stream functions:
Filename |
Handle |
Stream |
Standard Input |
0 |
stdin |
Standard Output |
1 |
stdout |
Standard Error |
2 |
stderr |
•Never call the following functions to exit your local application:
exit
_exit
Call the ExitLocalApp function instead.
•Because ESL for Windows local applications execute in the protected mode of the CPU, you must ensure that your application does not perform segment arithmetic, compare segment addresses, or read or write past the ends of memory objects. Violating any of these rules will almost certainly result in Windows terminating your local application and displaying a message box indicating the occurrence of a fatal error.
•Be careful if your local application issues software interrupts. Many software interrupt calls accessible from DOS programs are disabled when Windows is running. Do not pass pointers to memory objects residing within your local application or allocated from Windows global memory to TSRs (Terminate-and-Stay- Resident programs); TSRs run in real mode and cannot access these objects. Refer to the Windows SDK documentation for more information about issuing software interrupts from protected mode.
•Make sure your local application does not execute for an extended period of time without calling any of the following functions:
oGetCharacter
oGetLine
oPutCharacter
oPutCharacterBuf
oPutString
oSuspend
oSleep
Otherwise, other Windows applications, including the ESL runtime, will appear to be hung; they will not respond to mouse and keyboard input. It is a good idea to place a function call to Suspend inside of loops that require a lot of CPU time to complete.