+#if _MSC_VER && G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
+static gchar*
+g_get_known_folder_path (void)
+{
+ gchar *folder_path = NULL;
+ PWSTR profile_path = NULL;
+ HRESULT hr = SHGetKnownFolderPath (&FOLDERID_Profile, KF_FLAG_DEFAULT, NULL, &profile_path);
+ if (SUCCEEDED(hr)) {
+ folder_path = u16to8 (profile_path);
+ CoTaskMemFree (profile_path);
+ }
+
+ return folder_path;
+}
+
+#else
+
+static inline gchar *
+g_get_known_folder_path (void)
+{
+ return NULL;
+}
+#endif
+