04-08-2006 02:36 PM
04-10-2006 12:04 PM
Your legacy code has its own interrupt service routine and interacts with the com port at a very low level.
WIn2K, NT, and XP all use a "Hardware Abstraction Layer" that purposely prevents interacting with the hardware at that level.
There are third party products that attempt to emulate the DOS / Win9X environment for interrupt driven legacy code, but we've had bad luck with them. They seem to have a hard time emulating the IRQ functionality. They kindof work, but interrupt response is very slow.
You could re-write to use the native Win32 serial drivers (and use the CVI serial library which runs on top of the native serial driver). The equivalent of interrupt response to a serial port using the NI rs-232 library is to install a com port callback, which will "interrupt" with a callback on specified serial port input conditions (e.g. a character in the in queue). With a modern PC it's likely you can match the interrupt driven performance of your legacy system unless maybe you're using a custom bit rate that's very high.
Some of the NI serial cards (843X) use the new NI serial driver, which I believe is a kernel mode (i.e. low level, below the HAL) driver that supports hyperthreading and multi-processing. We've had serial ports that simply won't work if hyper-threading or multi-processing is enabled.
Hayes