Re: Hello and win32 g_io_channel help needed
- From: Chris Vine <chris cvine freeserve co uk>
- To: "Burke.Daniel" <Daniel Burke IGT com>
- Cc: gtk-list gnome org
- Subject: Re: Hello and win32 g_io_channel help needed
- Date: Thu, 03 May 2007 11:14:37 +0100
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]