Once a communication port is opened by a process in most multi-tasking operating systems, attempts by other processes to open the port fail due to a sharing violation. The opposite extreme would be to allow any application to take over the communication port whenever it desires. The HP palmtop provides a middle-ground solution that allows the hand-off (on demand) of communication port facilities, using the ComAcquire/ComRelease function calls.
If an application needs to override an exclusive open for some reason, it has the option to seize the communication port unconditionally. The application should first try to acquire access without seizing, but if another process has the port exclusively, a dialog box should give the user the option of overriding the other application. Based on the response, the application then may acquire the port unconditionally.
Well-behaved applications should only hold the communication port exclusively while using it, and release it immediately when finished.
A number of calls listed in the INTERFAC.H file do not apply to applications designed for HP palmtop System Manager compliance (they remain listed for compatibility with HP 95LX System Manager). Do not use the following calls when designing applications for the HP palmtop: