Namespace

GLibWin32 – 2.0

Windows-specific APIs in GLib

Version2.87.3
AuthorsGLib Development Team
LicenseLGPL-2.1-or-later
Websitehttps://www.gtk.org
Sourcehttps://gitlab.gnome.org/GNOME/glib/

Build

C headersglib.h
pkg-config filesglib-2.0

Dependencies

GLib—2.0 The base utility library
Browse documentation
GModule Portable API for dynamically loading modules
Browse documentation
GObject The base type system library
Browse documentation
GIO GObject Interfaces and Objects, Networking, IPC, and I/O
Browse documentation

Additional documentation

Enumerations

OSType

Type of Windows edition to check for at run-time.

Functions

check_windows_version

Returns whether the version of the Windows operating system the code is running on is at least the specified major, minor and service pack versions. See MSDN documentation for the Operating System Version. Software that needs even more detailed version and feature information should use the Win32 API VerifyVersionInfo() directly.

since: 2.44

error_message

Translate a Win32 error code into a human readable message.

ftruncate

get_command_line

Gets the command line arguments, on Windows, in the GLib filename encoding (ie: UTF-8).

since: 2.40

get_package_installation_directory

Try to determine the installation directory for a software package.

deprecated: 2.18 

get_package_installation_directory_of_module

This function tries to determine the installation directory of a software package based on the location of a DLL of the software package.

since: 2.16

get_package_installation_subdirectory

This function is deprecated. Use g_win32_get_package_installation_directory_of_module() and g_build_filename() instead.

deprecated: 2.18 

get_windows_version

This function is deprecated. Use g_win32_check_windows_version() instead.

deprecated: 2.44 

getlocale

The setlocale() function in the Microsoft C library uses locale names of the form “English_United States.1252” etc. We want the UNIXish standard form “en_US”, “zh_TW” etc. This function gets the current thread locale from Windows - without any encoding info - and returns it as a string of the above form for use in forming file names etc. The returned string should be deallocated with g_free().

locale_filename_from_utf8

Converts a filename from UTF-8 to the system codepage.

since: 2.8

Function Macros

clear_com

Releases the referenced COM object, and clears its pointer to NULL.

since: 2.84

HAVE_WIDECHAR_API