I have an application that needs to be able to accept commands from the ethernet, serial port, and/or GUI, process them, and then output the results over the ethernet and serial channels. The host OS is Windows NT4.0, so I'm limited to MSVC++ 6.0 and Boost libraries verion 1.34.1. I have created a class to act as a serial port server. In a separate thread, the constructor of the class is called, which opens the port and gets the handle. Then, its function "ProcessMessages" gets called, which constantly watches the serial port for incoming messages.
After processing a message, I need to write the result out to the serial port. I am getting an Access Violation whenever I try to use the handle to the serial port. I'm thinking I need to use a mutex, but I can't find any good example of the boost mutex to match my unique situation. Anybody have any ideas?