shell32(6/6): Document IQueryAssociations::GetString for ASSOCF_CONTENTTYPE, and quiet its fixme

Juan Lang juan.lang at gmail.com
Wed Aug 26 17:02:11 CDT 2009


--Juan
-------------- next part --------------
From 05bc31b634b7d1fcc0a17e157f444711a11e0a8b Mon Sep 17 00:00:00 2001
From: Juan Lang <juan.lang at gmail.com>
Date: Wed, 26 Aug 2009 14:54:31 -0700
Subject: [PATCH 8/8] Document IQueryAssociations::GetString for ASSOCF_CONTENTTYPE, and quiet its fixme

---
 dlls/shell32/assoc.c |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/dlls/shell32/assoc.c b/dlls/shell32/assoc.c
index 9652a7e..13f74e3 100644
--- a/dlls/shell32/assoc.c
+++ b/dlls/shell32/assoc.c
@@ -238,6 +238,25 @@ static HRESULT QueryAssociations_GetFriendlyDocName(QueryAssociationsImpl *This,
     return HRESULT_FROM_WIN32(l);
 }
 
+static HRESULT QueryAssociations_GetContentType(QueryAssociationsImpl *This,
+        ASSOCF flags, LPWSTR pszOut, DWORD *pcchOut)
+{
+    static int warned = 0;
+
+    /* FIXME: This is hard to implement, because the content type is stored
+     * as the "Content Type" value under the file extension key.  Unfortunately
+     * we may not have access to the file extension key:  if
+     * IQueryAssociations::Init is given a hkProgid, we only have a registry
+     * key, and no way of querying its name.  For now leave it unimplemented.
+     */
+    if (!warned)
+    {
+        FIXME("\n");
+        warned = 1;
+    }
+    return E_NOTIMPL;
+}
+
 static HRESULT QueryAssociations_GetDefaultIcon(QueryAssociationsImpl *This,
         ASSOCF flags, LPWSTR pszOut, DWORD *pcchOut)
 {
@@ -271,6 +290,9 @@ static HRESULT WINAPI IQueryAssociations_fnGetString(IQueryAssociations *iface,
          hr = QueryAssociations_GetFriendlyDocName(This, flags, pszOut,
                  pcchOut);
          break;
+     case ASSOCSTR_CONTENTTYPE:
+         hr = QueryAssociations_GetContentType(This, flags, pszOut, pcchOut);
+         break;
      case ASSOCSTR_DEFAULTICON:
          hr = QueryAssociations_GetDefaultIcon(This, flags, pszOut, pcchOut);
          break;
-- 
1.6.3.2


More information about the wine-patches mailing list