I have an application which runs on DOS and Win 95/98. This
application writes to parallel port directly (using interrupts). When
using on Win95/98, I get an exception thrown by Windows saying "you
are trying to write on LPT1 which is used by another application, Do
you want to take control of parallel port ?". Now, I want to trap this
exception so that I can handle it differently. Basically I want to
find out if other application is writing to LPT1, my application must
know and should handle it, like wait for sometime and then write. I
dont want user to see Windows error. Now whatever is the solution, I
must be able to compile it with a 16 bit dos extender. This is because
I will use the same application on DOS. I dont want to use any Windows
API to trap this exception. |