TIP: Click on subject to list as thread! ANSI
echo: maximus
to: DALE ROSS
from: PETER KNAPPER
date: 1998-02-14 09:02:00
subject: Max/NT - Dos Doors ?

Hi Dale,
 DR> Also I think that this problem exists in OS/2, however 
 DR> someone did find the time to tackle it. Someone more 
 DR> versed in OS/2 and 32-bit to 16-bit COM port handling 
 DR> can better address those issues.
Under OS/2, a COM port is accessed just like a FILE, it is Opened, Read, 
Written to and Closed in exactly the same manner. Therefore as with Files, 
COM ports can be shared, PROVIDED the application wishing to access the COM 
port does so using a SHARED mode of operation. Both 32 bit and 16 bit OS/2 
apps can share a COM port in this manner, there is no difference in the way 
they do it, so Sharing of the COM port for OS/2 apps is easy. 
If a COM port is first opened as SHARED, then any subsequent OS/2 app can 
also open it as SHARED and gain access to it. If it is first opened as 
DEDICATED, then no other app can access it!
So the answer to your question above is yes, both 16 bit and 32 bit OS/2 apps 
can share a COM port, provided they all do so with sharing in mind.
DOS apps are another matter, simply because DOS never provided support for 
COM port access itself, it was always left up to the App to handle it 
directly, and the key here is HOW the DOS app implements COM port access. DOS 
apps that try to natively access (IE using the normal DOS convention of 
directly accessing the COM port H/W) a COM port that is already Opened by an 
OS/2 app, will fail, because the OS/2 apps have the resource open and it is 
not available as a dedicated resource to anyone else (DOS or OS/2) and direct 
device access as used by the DOS app would be prevented from doing this. 
This can be worked around by the DOS app, PROVIDED they can use a FOSSIL to 
access the PORT and provided that Fossil is able to access a pre-opened COM 
port in Shared mode, then there should be no problem. If the app tries to 
open the COM port themselves, then they are probably going to be out of luck 
because the resource they want is still in use by the OS/2 apps.
I hope this explains the OS/2 perspective on this issue............pk.
--- Maximus/2 3.01
---------------
* Origin: Another Good Point About OS/2 (3:772/1.10)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.