RE: Hello and win32 g_io_channel help needed

Actually.. I have commented out the reading and my callback is called very quickly whenever I drag the window around with my mouse, so I really think there must be something wrong with the way I am getting a file descriptor or something like that?



From: gtk-list-bounces gnome org [mailto:gtk-list-bounces gnome org] On Behalf Of Burke.Daniel
Sent: Thursday, 3 May 2007 14:04
To: gtk-list gnome org
Subject: Hello and win32 g_io_channel help needed


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,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]