shell32(5/6): Implement IQueryAssociations::GetString for ASSOCF_DEFAULTICON
Juan Lang
juan.lang at gmail.com
Wed Aug 26 17:01:53 CDT 2009
--Juan
-------------- next part --------------
From a66903f195de038d6a45814a55e5a5c9d978c6a4 Mon Sep 17 00:00:00 2001
From: Juan Lang <juan.lang at gmail.com>
Date: Wed, 26 Aug 2009 14:40:10 -0700
Subject: [PATCH 7/8] Implement IQueryAssociations::GetString for ASSOCF_DEFAULTICON
---
dlls/shell32/assoc.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/dlls/shell32/assoc.c b/dlls/shell32/assoc.c
index c4995e5..9652a7e 100644
--- a/dlls/shell32/assoc.c
+++ b/dlls/shell32/assoc.c
@@ -238,6 +238,17 @@ static HRESULT QueryAssociations_GetFriendlyDocName(QueryAssociationsImpl *This,
return HRESULT_FROM_WIN32(l);
}
+static HRESULT QueryAssociations_GetDefaultIcon(QueryAssociationsImpl *This,
+ ASSOCF flags, LPWSTR pszOut, DWORD *pcchOut)
+{
+ static const WCHAR defaultIcon[] = { 'D','e','f','a','u','l','t',
+ 'I','c','o','n',0 };
+ LONG l = RegGetValueW(This->key, defaultIcon, NULL, RRF_RT_REG_SZ, NULL,
+ pszOut, pcchOut);
+
+ return HRESULT_FROM_WIN32(l);
+}
+
static HRESULT WINAPI IQueryAssociations_fnGetString(IQueryAssociations *iface,
ASSOCF flags, ASSOCSTR str, LPCWSTR pszExtra, LPWSTR pszOut,
DWORD *pcchOut)
@@ -260,6 +271,9 @@ static HRESULT WINAPI IQueryAssociations_fnGetString(IQueryAssociations *iface,
hr = QueryAssociations_GetFriendlyDocName(This, flags, pszOut,
pcchOut);
break;
+ case ASSOCSTR_DEFAULTICON:
+ hr = QueryAssociations_GetDefaultIcon(This, flags, pszOut, pcchOut);
+ break;
default:
FIXME("unimplemented for %d, %s\n", str, debugstr_w(pszExtra));
hr = E_NOTIMPL;
--
1.6.3.2
More information about the wine-patches
mailing list