Hail! I am new.. so gday to everyone here. I am after some assistance with getting my event-driven
serial port input working on Windows. The project is a portable serial tool for internal use
within our company, I am writing it using libglademm since I love C++ and am a
big Gnome/GTK fan (my laptop being Ubuntu Gnome based) On Linux I am using open and termios to handle the serial
port setup, finally returning a GIOChannel for monitoring and so far.. so
good. However I am now trying to get the evil version of it running and am not
so happy. Here I am using CreateFile to open and configure my port, then use: m_PortDescriptor = _open_osfhandle((long)m_PortHandle, 0); channel = g_io_channel_unix_new(m_PortDescriptor); to get the channel. Later on I use g_io_add_watch to setup
a monitor which seems to compile and run ok, however when I send data using g_io_channel_write_chars
it seems to crash and I also don’t seem to be receiving data (often
resulting another application halt) I am not a GTK expert (this is my first project in it) and
would really appreciate help since I want to promote using this sort of
solution internally as much as possible. Kind regards, Burkey |