RE: Hello and win32 g_io_channel help needed



Actually I changed it to use the win32 one but it behaves the same.

This seems to be a difficult one to answer, so far nobody has been able to even suggest anything.


-----Original Message-----
From: Chris Vine [mailto:chris cvine freeserve co uk] 
Sent: Thursday, 3 May 2007 20:15
To: Burke.Daniel
Cc: gtk-list gnome org
Subject: Re: Hello and win32 g_io_channel help needed

On Thu, 2007-05-03 at 14:04 +1000, Burke.Daniel wrote:
> 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)

You mention that you are using Windows, so is there any reason why you
are calling g_io_channel_unix_new() instead of the
g_io_channel_win32_new*() functions to create the GIOChannel object?

Chris






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