GWin32InputStream

## GWin32InputStream GWin32InputStream — Streaming input operations for Windows file handles |

## Synopsis

    #include <gio/gwin32inputstream.h>

    struct              GWin32InputStream;
    GInputStream *      g_win32_input_stream_new            (void *handle,
                                                             gboolean close_handle);
    void                g_win32_input_stream_set_close_handle
                                                            (GWin32InputStream *stream,
                                                             gboolean close_handle);
    gboolean            g_win32_input_stream_get_close_handle
                                                            (GWin32InputStream *stream);
    void *              g_win32_input_stream_get_handle     (GWin32InputStream *stream);

## Description

GWin32InputStream implements GInputStream for reading from a Windows file handle.

Note that `<gio/gwin32inputstream.h>` belongs to the Windows-specific GIO interfaces, thus you have to use the `gio-windows-2.0.pc` pkg-config file when using it.

## Details

### struct GWin32InputStream

    struct GWin32InputStream {
      GInputStream parent_instance;
    };

Implements GInputStream for reading from selectable Windows file handles

### g_win32_input_stream_new ()

    GInputStream *      g_win32_input_stream_new            (void *handle,
                                                             gboolean close_handle);

Creates a new GWin32InputStream for the given `handle`.

If `close_handle` is `TRUE`, the handle will be closed when the stream is closed.

Note that "handle" here means a Win32 HANDLE, not a "file descriptor" as used in the Windows C libraries.

`handle` : | a Win32 file handle
`close_handle` : | `TRUE` to close the handle when done
Returns : | a new GWin32InputStream

### g_win32_input_stream_set_close_handle ()

    void                g_win32_input_stream_set_close_handle
                                                            (GWin32InputStream *stream,
                                                             gboolean close_handle);

Sets whether the handle of `stream` shall be closed when the stream is closed.

`stream` : | a GWin32InputStream
`close_handle` : | `TRUE` to close the handle when done

Since 2.26

### g_win32_input_stream_get_close_handle ()

    gboolean            g_win32_input_stream_get_close_handle
                                                            (GWin32InputStream *stream);

Returns whether the handle of `stream` will be closed when the stream is closed.

`stream` : | a GWin32InputStream
Returns : | `TRUE` if the handle is closed when done

Since 2.26

### g_win32_input_stream_get_handle ()

    void *              g_win32_input_stream_get_handle     (GWin32InputStream *stream);

Return the Windows file handle that the stream reads from.

`stream` : | a GWin32InputStream
Returns : | The file handle of `stream`

Since 2.26

## See Also

GInputStream