[glib/vs2012-2-68: 3/3] README.win32.md: Add info on roapi.h
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/vs2012-2-68: 3/3] README.win32.md: Add info on roapi.h
- Date: Wed, 31 Mar 2021 09:05:41 +0000 (UTC)
commit 7e43547d5fd9fa8d0b1d6e31663353d6f9ab329d
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Wed Mar 31 17:02:16 2021 +0800
README.win32.md: Add info on roapi.h
The roapi.h that is included with the Windows 8.0 SDK mostly works under
plain C with one exception, so let people know the fix for that. Note
that the Windows 8.1 and 10 SDKs contain copies of roapi.h that is
directly usable under plain C.
README.win32.md | 28 +++++++++++++++++++++++++++-
1 file changed, 27 insertions(+), 1 deletion(-)
---
diff --git a/README.win32.md b/README.win32.md
index 17b36acbf..bbbfe4d04 100644
--- a/README.win32.md
+++ b/README.win32.md
@@ -163,7 +163,33 @@ normally.
### Support for pre-2012 Visual Studio
-This release of GLib requires at least the Windows 8 SDK in order to be built
+This release of GLib requires at least the Windows 8.0 SDK in order to be built
successfully using Visual Studio, which means that it is no longer supported to
build GLib with Visual Studio 2008 nor 2010. People that still need to use
Visual Studio 2008 or 2010 should continue to use glib-2.66.x.
+
+The Windows 8.0 SDK headers may contain an roapi.h that cannot be used under plain
+C, so to remedy that, change the following line:
+
+```
+// RegisterActivationFactory/RevokeActivationFactory registration cookie
+typedef struct {} *RO_REGISTRATION_COOKIE;
+// RegisterActivationFactory/DllGetActivationFactory callback
+``` (around lines 55-57)
+
+-to-
+
+```
+// RegisterActivationFactory/RevokeActivationFactory registration cookie
+#ifdef __cplusplus
+typedef struct {} *RO_REGISTRATION_COOKIE;
+#else
+typedef struct _RO_REGISTRATION_COOKIE *RO_REGISTRATION_COOKIE; /* make this header includable in C files */
+#endif
+// RegisterActivationFactory/DllGetActivationFactory callback
+```
+
+This follows what is done in the Windows 8.1 SDK, which contains an roapi.h
+that is usable under plain C. Please note that you might need to copy that file
+into a location that is in your %INCLUDE% which precedes the include path for the
+Windows 8.0 SDK headers, if you do not have administrative privileges.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]