Blame docs/reference/glib/html/glib-Windows-Compatibility-Functions.html

Packit ae235b
Packit ae235b
<html>
Packit ae235b
<head>
Packit ae235b
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
Packit ae235b
<title>Windows Compatibility Functions: GLib Reference Manual</title>
Packit ae235b
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
Packit ae235b
<link rel="home" href="index.html" title="GLib Reference Manual">
Packit ae235b
<link rel="up" href="glib-utilities.html" title="GLib Utilities">
Packit ae235b
<link rel="prev" href="glib-UNIX-specific-utilities-and-integration.html" title="UNIX-specific utilities and integration">
Packit ae235b
<link rel="next" href="glib-GUuid.html" title="GUuid">
Packit ae235b
<meta name="generator" content="GTK-Doc V1.27 (XML mode)">
Packit ae235b
<link rel="stylesheet" href="style.css" type="text/css">
Packit ae235b
</head>
Packit ae235b
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
Packit ae235b
Packit ae235b
Packit ae235b
Top  | 
Packit ae235b
                  Description
Packit ae235b
Packit ae235b
Home
Packit ae235b
Up
Packit ae235b
Prev
Packit ae235b
Next
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Windows Compatibility Functions

Packit ae235b

Windows Compatibility Functions — UNIX emulation on Windows

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Functions

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
gboolean
Packit ae235b
Packit ae235b
Packit ae235b
g_win32_check_windows_version ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
gchar **
Packit ae235b
Packit ae235b
Packit ae235b
g_win32_get_command_line ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
gchar *
Packit ae235b
Packit ae235b
Packit ae235b
g_win32_error_message ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
gchar *
Packit ae235b
Packit ae235b
Packit ae235b
g_win32_getlocale ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
gchar *
Packit ae235b
Packit ae235b
Packit ae235b
g_win32_get_package_installation_directory ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
gchar *
Packit ae235b
Packit ae235b
Packit ae235b
g_win32_get_package_installation_directory_of_module ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
gchar *
Packit ae235b
Packit ae235b
Packit ae235b
g_win32_get_package_installation_subdirectory ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
guint
Packit ae235b
Packit ae235b
Packit ae235b
g_win32_get_windows_version ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
gchar *
Packit ae235b
Packit ae235b
Packit ae235b
g_win32_locale_filename_from_utf8 ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
G_WIN32_DLLMAIN_FOR_DLL_NAME()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_WIN32_HAVE_WIDECHAR_API
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_WIN32_IS_NT_BASED
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Types and Values

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
MAXPATHLEN
Packit ae235b
Packit ae235b
Packit ae235b
enum
Packit ae235b
GWin32OSType
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Includes

Packit ae235b
#include <gmodule.h>
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Description

Packit ae235b

These functions provide some level of UNIX emulation on the

Packit ae235b
Windows platform. If your application really needs the POSIX
Packit ae235b
APIs, we suggest you try the Cygwin project.

Packit ae235b
Packit ae235b
Packit ae235b

Functions

Packit ae235b
Packit ae235b

g_win32_check_windows_version ()

Packit ae235b
gboolean
Packit ae235b
g_win32_check_windows_version (const gint major,
Packit ae235b
                               const gint minor,
Packit ae235b
                               const gint spver,
Packit ae235b
                               const GWin32OSType os_type);
Packit ae235b

Returns whether the version of the Windows operating system the

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

Packit ae235b

Successive calls of this function can be used for enabling or

Packit ae235b
disabling features at run-time for a range of Windows versions,
Packit ae235b
as per the VerifyVersionInfo() API documentation.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

major

Packit ae235b

major version of Windows

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

minor

Packit ae235b

minor version of Windows

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

spver

Packit ae235b

Windows Service Pack Level, 0 if none

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

os_type

Packit ae235b

Type of Windows OS

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

TRUE if the Windows Version is the same or greater than

Packit ae235b
the specified major, minor and service pack versions, and
Packit ae235b
whether the running Windows is a workstation or server edition
Packit ae235b
of Windows, if specifically specified.

Packit ae235b
Packit ae235b

Since: 2.44

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_win32_get_command_line ()

Packit ae235b
gchar **
Packit ae235b
g_win32_get_command_line (void);
Packit ae235b

Gets the command line arguments, on Windows, in the GLib filename

Packit ae235b
encoding (ie: UTF-8).

Packit ae235b

Normally, on Windows, the command line arguments are passed to main()

Packit ae235b
in the system codepage encoding.  This prevents passing filenames as
Packit ae235b
arguments if the filenames contain characters that fall outside of
Packit ae235b
this codepage.  If such filenames are passed, then substitutions
Packit ae235b
will occur (such as replacing some characters with '?').

Packit ae235b

GLib's policy of using UTF-8 as a filename encoding on Windows was

Packit ae235b
designed to localise the pain of dealing with filenames outside of
Packit ae235b
the system codepage to one area: dealing with commandline arguments
Packit ae235b
in main().

Packit ae235b

As such, most GLib programs should ignore the value of argv passed to

Packit ae235b
their main() function and call g_win32_get_command_line() instead.
Packit ae235b
This will get the "full Unicode" commandline arguments using
Packit ae235b
GetCommandLineW() and convert it to the GLib filename encoding (which
Packit ae235b
is UTF-8 on Windows).

Packit ae235b

The strings returned by this function are suitable for use with

Packit ae235b
functions such as g_open() and g_file_new_for_commandline_arg() but
Packit ae235b
are not suitable for use with g_option_context_parse(), which assumes
Packit ae235b
that its input will be in the system codepage.  The return value is
Packit ae235b
suitable for use with g_option_context_parse_strv(), however, which
Packit ae235b
is a better match anyway because it won't leak memory.

Packit ae235b

Unlike argv, the returned value is a normal strv and can (and should)

Packit ae235b
be freed with g_strfreev() when no longer needed.

Packit ae235b
Packit ae235b

Returns

Packit ae235b

the commandline arguments in the GLib

Packit ae235b
filename encoding (ie: UTF-8). 

Packit ae235b

[transfer full]

Packit ae235b
Packit ae235b

Since: 2.40

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_win32_error_message ()

Packit ae235b
gchar *
Packit ae235b
g_win32_error_message (gint error);
Packit ae235b

Translate a Win32 error code (as returned by GetLastError() or

Packit ae235b
WSAGetLastError()) into the corresponding message. The message is
Packit ae235b
either language neutral, or in the thread's language, or the user's
Packit ae235b
language, the system's language, or US English (see docs for
Packit ae235b
FormatMessage()). The returned string is in UTF-8. It should be
Packit ae235b
deallocated with g_free().

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

error

Packit ae235b

error code.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

newly-allocated error message

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_win32_getlocale ()

Packit ae235b
gchar *
Packit ae235b
g_win32_getlocale (void);
Packit ae235b

The setlocale() function in the Microsoft C library uses locale

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

Packit ae235b
Packit ae235b

Returns

Packit ae235b

newly-allocated locale name.

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_win32_get_package_installation_directory ()

Packit ae235b
gchar *
Packit ae235b
g_win32_get_package_installation_directory
Packit ae235b
                               (const gchar *package,
Packit ae235b
                                const gchar *dll_name);
Packit ae235b
Packit ae235b

g_win32_get_package_installation_directory has been deprecated since version 2.18 and should not be used in newly-written code.

Packit ae235b

Pass the HMODULE of a DLL or EXE to

Packit ae235b
g_win32_get_package_installation_directory_of_module() instead.

Packit ae235b
Packit ae235b

Try to determine the installation directory for a software package.

Packit ae235b

This function is deprecated. Use

Packit ae235b
g_win32_get_package_installation_directory_of_module() instead.

Packit ae235b

The use of package

Packit ae235b
 is deprecated. You should always pass NULL. A
Packit ae235b
warning is printed if non-NULL is passed as package
Packit ae235b
.

Packit ae235b

The original intended use of package

Packit ae235b
 was for a short identifier of
Packit ae235b
the package, typically the same identifier as used for
Packit ae235b
GETTEXT_PACKAGE in software configured using GNU
Packit ae235b
autotools. The function first looks in the Windows Registry for the
Packit ae235b
value #InstallationDirectory in the key
Packit ae235b
#HKLM\Software\@package, and if that value
Packit ae235b
exists and is a string, returns that.

Packit ae235b

It is strongly recommended that packagers of GLib-using libraries

Packit ae235b
for Windows do not store installation paths in the Registry to be
Packit ae235b
used by this function as that interfers with having several
Packit ae235b
parallel installations of the library. Enabling multiple
Packit ae235b
installations of different versions of some GLib-using library, or
Packit ae235b
GLib itself, is desirable for various reasons.

Packit ae235b

For this reason it is recommeded to always pass NULL as

Packit ae235b
package
Packit ae235b
 to this function, to avoid the temptation to use the
Packit ae235b
Registry. In version 2.20 of GLib the package
Packit ae235b
 parameter
Packit ae235b
will be ignored and this function won't look in the Registry at all.

Packit ae235b

If package

Packit ae235b
 is NULL, or the above value isn't found in the
Packit ae235b
Registry, but dll_name
Packit ae235b
 is non-NULL, it should name a DLL loaded
Packit ae235b
into the current process. Typically that would be the name of the
Packit ae235b
DLL calling this function, looking for its installation
Packit ae235b
directory. The function then asks Windows what directory that DLL
Packit ae235b
was loaded from. If that directory's last component is "bin" or
Packit ae235b
"lib", the parent directory is returned, otherwise the directory
Packit ae235b
itself. If that DLL isn't loaded, the function proceeds as if
Packit ae235b
dll_name
Packit ae235b
 was NULL.

Packit ae235b

If both package

Packit ae235b
 and dll_name
Packit ae235b
 are NULL, the directory from where
Packit ae235b
the main executable of the process was loaded is used instead in
Packit ae235b
the same way as above.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

package

Packit ae235b

You should pass NULL for this.

Packit ae235b
[nullable]
Packit ae235b
Packit ae235b
Packit ae235b

dll_name

Packit ae235b

The name of a DLL that a package provides in UTF-8, or NULL.

Packit ae235b
[nullable]
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

a string containing the installation directory for

Packit ae235b
package
Packit ae235b
. The string is in the GLib file name encoding,
Packit ae235b
i.e. UTF-8. The return value should be freed with g_free() when not
Packit ae235b
needed any longer. If the function fails NULL is returned.

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_win32_get_package_installation_directory_of_module ()

Packit ae235b
gchar *
Packit ae235b
g_win32_get_package_installation_directory_of_module
Packit ae235b
                               (gpointer hmodule);
Packit ae235b

This function tries to determine the installation directory of a

Packit ae235b
software package based on the location of a DLL of the software
Packit ae235b
package.

Packit ae235b

hmodule

Packit ae235b
 should be the handle of a loaded DLL or NULL. The
Packit ae235b
function looks up the directory that DLL was loaded from. If
Packit ae235b
hmodule
Packit ae235b
 is NULL, the directory the main executable of the current
Packit ae235b
process is looked up. If that directory's last component is "bin"
Packit ae235b
or "lib", its parent directory is returned, otherwise the directory
Packit ae235b
itself.

Packit ae235b

It thus makes sense to pass only the handle to a "public" DLL of a

Packit ae235b
software package to this function, as such DLLs typically are known
Packit ae235b
to be installed in a "bin" or occasionally "lib" subfolder of the
Packit ae235b
installation folder. DLLs that are of the dynamically loaded module
Packit ae235b
or plugin variety are often located in more private locations
Packit ae235b
deeper down in the tree, from which it is impossible for GLib to
Packit ae235b
deduce the root of the package installation.

Packit ae235b

The typical use case for this function is to have a DllMain() that

Packit ae235b
saves the handle for the DLL. Then when code in the DLL needs to
Packit ae235b
construct names of files in the installation tree it calls this
Packit ae235b
function passing the DLL handle.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

hmodule

Packit ae235b

The Win32 handle for a DLL loaded into the current process, or NULL.

Packit ae235b
[nullable]
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

a string containing the guessed installation directory for

Packit ae235b
the software package hmodule
Packit ae235b
is from. The string is in the GLib
Packit ae235b
file name encoding, i.e. UTF-8. The return value should be freed
Packit ae235b
with g_free() when not needed any longer. If the function fails
Packit ae235b
NULL is returned.

Packit ae235b
Packit ae235b

Since: 2.16

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_win32_get_package_installation_subdirectory ()

Packit ae235b
gchar *
Packit ae235b
g_win32_get_package_installation_subdirectory
Packit ae235b
                               (const gchar *package,
Packit ae235b
                                const gchar *dll_name,
Packit ae235b
                                const gchar *subdir);
Packit ae235b
Packit ae235b

g_win32_get_package_installation_subdirectory has been deprecated since version 2.18 and should not be used in newly-written code.

Packit ae235b

Pass the HMODULE of a DLL or EXE to

Packit ae235b
g_win32_get_package_installation_directory_of_module() instead, and
Packit ae235b
then construct a subdirectory pathname with g_build_filename().

Packit ae235b
Packit ae235b

This function is deprecated. Use

Packit ae235b
g_win32_get_package_installation_directory_of_module() and
Packit ae235b
g_build_filename() instead.

Packit ae235b

Returns a newly-allocated string containing the path of the

Packit ae235b
subdirectory subdir
Packit ae235b
 in the return value from calling
Packit ae235b
g_win32_get_package_installation_directory() with the package
Packit ae235b
 and
Packit ae235b
dll_name
Packit ae235b
 parameters. See the documentation for
Packit ae235b
g_win32_get_package_installation_directory() for more details. In
Packit ae235b
particular, note that it is deprecated to pass anything except NULL
Packit ae235b
as package
Packit ae235b
.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

package

Packit ae235b

You should pass NULL for this.

Packit ae235b
[nullable]
Packit ae235b
Packit ae235b
Packit ae235b

dll_name

Packit ae235b

The name of a DLL that a package provides, in UTF-8, or NULL.

Packit ae235b
[nullable]
Packit ae235b
Packit ae235b
Packit ae235b

subdir

Packit ae235b

A subdirectory of the package installation directory, also in UTF-8

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

a string containing the complete path to subdir

Packit ae235b
inside
Packit ae235b
the installation directory of package
Packit ae235b
. The returned string is in
Packit ae235b
the GLib file name encoding, i.e. UTF-8. The return value should be
Packit ae235b
freed with g_free() when no longer needed. If something goes wrong,
Packit ae235b
NULL is returned.

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_win32_get_windows_version ()

Packit ae235b
guint
Packit ae235b
g_win32_get_windows_version (void);
Packit ae235b
Packit ae235b

g_win32_get_windows_version has been deprecated since version 2.44 and should not be used in newly-written code.

Packit ae235b

Be aware that for Windows 8.1 and Windows Server

Packit ae235b
2012 R2 and later, this will return 62 unless the application is
Packit ae235b
manifested for Windows 8.1/Windows Server 2012 R2, for example.
Packit ae235b
MSDN stated that GetVersion(), which is used here, is subject to
Packit ae235b
further change or removal after Windows 8.1.

Packit ae235b
Packit ae235b

This function is deprecated. Use

Packit ae235b
g_win32_check_windows_version() instead.

Packit ae235b

Returns version information for the Windows operating system the

Packit ae235b
code is running on. See MSDN documentation for the GetVersion()
Packit ae235b
function. To summarize, the most significant bit is one on Win9x,
Packit ae235b
and zero on NT-based systems. Since version 2.14, GLib works only
Packit ae235b
on NT-based systems, so checking whether your are running on Win9x
Packit ae235b
in your own software is moot. The least significant byte is 4 on
Packit ae235b
Windows NT 4, and 5 on Windows XP. Software that needs really
Packit ae235b
detailed version and feature information should use Win32 API like
Packit ae235b
GetVersionEx() and VerifyVersionInfo().

Packit ae235b
Packit ae235b

Returns

Packit ae235b

The version information.

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_win32_locale_filename_from_utf8 ()

Packit ae235b
gchar *
Packit ae235b
g_win32_locale_filename_from_utf8 (const gchar *utf8filename);
Packit ae235b

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

Packit ae235b

On NT-based Windows, on NTFS file systems, file names are in

Packit ae235b
Unicode. It is quite possible that Unicode file names contain
Packit ae235b
characters not representable in the system codepage. (For instance,
Packit ae235b
Greek or Cyrillic characters on Western European or US Windows
Packit ae235b
installations, or various less common CJK characters on CJK Windows
Packit ae235b
installations.)

Packit ae235b

In such a case, and if the filename refers to an existing file, and

Packit ae235b
the file system stores alternate short (8.3) names for directory
Packit ae235b
entries, the short form of the filename is returned. Note that the
Packit ae235b
"short" name might in fact be longer than the Unicode name if the
Packit ae235b
Unicode name has very short pathname components containing
Packit ae235b
non-ASCII characters. If no system codepage name for the file is
Packit ae235b
possible, NULL is returned.

Packit ae235b

The return value is dynamically allocated and should be freed with

Packit ae235b
g_free() when no longer needed.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

utf8filename

Packit ae235b

a UTF-8 encoded filename.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

The converted filename, or NULL on conversion

Packit ae235b
failure and lack of short names.

Packit ae235b
Packit ae235b

Since: 2.8

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

G_WIN32_DLLMAIN_FOR_DLL_NAME()

Packit ae235b
# define G_WIN32_DLLMAIN_FOR_DLL_NAME(static, dll_name)
Packit ae235b
Packit ae235b

G_WIN32_DLLMAIN_FOR_DLL_NAME is deprecated and should not be used in newly-written code.

Packit ae235b

On Windows, this macro defines a DllMain() function that stores

Packit ae235b
the actual DLL name that the code being compiled will be included in.

Packit ae235b

On non-Windows platforms, expands to nothing.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

static

Packit ae235b

empty or "static"

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

dll_name

Packit ae235b

the name of the (pointer to the) char array where

Packit ae235b
the DLL name will be stored. If this is used, you must also
Packit ae235b
include windows.h. If you need a more complex DLL entry
Packit ae235b
point function, you cannot use this

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

G_WIN32_HAVE_WIDECHAR_API

Packit ae235b
#define G_WIN32_HAVE_WIDECHAR_API() TRUE
Packit ae235b
Packit ae235b

On Windows, this macro defines an expression which evaluates to

Packit ae235b
TRUE if the code is running on a version of Windows where the wide
Packit ae235b
character versions of the Win32 API functions, and the wide character
Packit ae235b
versions of the C library functions work. (They are always present in
Packit ae235b
the DLLs, but don't work on Windows 9x and Me.)

Packit ae235b

On non-Windows platforms, it is not defined.

Packit ae235b

Since: 2.6

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

G_WIN32_IS_NT_BASED

Packit ae235b
#define G_WIN32_IS_NT_BASED() TRUE
Packit ae235b
Packit ae235b

On Windows, this macro defines an expression which evaluates to

Packit ae235b
TRUE if the code is running on an NT-based Windows operating system.

Packit ae235b

On non-Windows platforms, it is not defined.

Packit ae235b

Since: 2.6

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Types and Values

Packit ae235b
Packit ae235b

MAXPATHLEN

Packit ae235b
#define MAXPATHLEN 1024
Packit ae235b
Packit ae235b

Provided for UNIX emulation on Windows; equivalent to UNIX

Packit ae235b
macro MAXPATHLEN, which is the maximum length of a filename
Packit ae235b
(including full path).

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

enum GWin32OSType

Packit ae235b

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

Packit ae235b
Packit ae235b

Members

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

G_WIN32_OS_ANY

Packit ae235b
Packit ae235b

The running system can be a workstation or a server edition of

Packit ae235b
 Windows.  The type of the running system is therefore not checked.

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_WIN32_OS_WORKSTATION

Packit ae235b
Packit ae235b

The running system is a workstation edition of Windows,

Packit ae235b
 such as Windows 7 Professional.

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_WIN32_OS_SERVER

Packit ae235b
Packit ae235b

The running system is a server edition of Windows, such as

Packit ae235b
 Windows Server 2008 R2.

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Generated by GTK-Doc V1.27
Packit ae235b
</body>
Packit ae235b
</html>