IOChannel.win32_NewFd

Creates a new GIOChannel given a file descriptor on Windows. This works for file descriptors from the C runtime. This function works for file descriptors as returned by the open(), creat(), pipe() and fileno() calls in the Microsoft C runtime. In order to meaningfully use this function your code should use the same C runtime as GLib uses, which is msvcrt.dll. Note that in current Microsoft compilers it is near impossible to convince it to build code that would use msvcrt.dll. The last Microsoft compiler version that supported using msvcrt.dll as the C runtime was version 6. The GNU compiler and toolchain for Windows, also known as Mingw, fully supports msvcrt.dll. If you have created a GIOChannel for a file descriptor and started watching (polling) it, you shouldn't call read() on the file descriptor. This is because adding polling for a file descriptor is implemented in GLib on Windows by starting a thread that sits blocked in a read() from the file descriptor most of the time. All reads from the file descriptor should be done by this internal GLib thread. Your code should call only g_io_channel_read(). This function is available only in GLib on Windows.

class IOChannel
static
win32_NewFd
(
int fd
)

Parameters

fd int

a C library file descriptor.

Return Value

Type: IOChannel

a new GIOChannel.

Meta