Damjan Jovanovic : shlwapi: Support the content type query.
Alexandre Julliard
julliard at winehq.org
Mon Jan 19 08:58:29 CST 2009
Module: wine
Branch: master
Commit: c160b944b1a15de2018581394fe459c04ce39121
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c160b944b1a15de2018581394fe459c04ce39121
Author: Damjan Jovanovic <damjan.jov at gmail.com>
Date: Sun Jan 18 14:25:08 2009 +0200
shlwapi: Support the content type query.
---
dlls/shlwapi/assoc.c | 26 ++++++++++++++++++++++++++
1 files changed, 26 insertions(+), 0 deletions(-)
diff --git a/dlls/shlwapi/assoc.c b/dlls/shlwapi/assoc.c
index b619518..070ca1a 100644
--- a/dlls/shlwapi/assoc.c
+++ b/dlls/shlwapi/assoc.c
@@ -825,6 +825,32 @@ get_friendly_name_fail:
return ASSOC_ReturnData(pszOut, pcchOut, path, strlenW(path) + 1);
}
+ case ASSOCSTR_CONTENTTYPE:
+ {
+ static const WCHAR Content_TypeW[] = {'C','o','n','t','e','n','t',' ','T','y','p','e',0};
+ WCHAR *contentType;
+ DWORD ret;
+ DWORD size;
+
+ size = 0;
+ ret = RegGetValueW(This->hkeySource, NULL, Content_TypeW, RRF_RT_REG_SZ, NULL, NULL, &size);
+ if (ret != ERROR_SUCCESS)
+ return HRESULT_FROM_WIN32(ret);
+ contentType = HeapAlloc(GetProcessHeap(), 0, size);
+ if (contentType != NULL)
+ {
+ ret = RegGetValueW(This->hkeySource, NULL, Content_TypeW, RRF_RT_REG_SZ, NULL, contentType, &size);
+ if (ret == ERROR_SUCCESS)
+ hr = ASSOC_ReturnData(pszOut, pcchOut, contentType, strlenW(contentType) + 1);
+ else
+ hr = HRESULT_FROM_WIN32(ret);
+ HeapFree(GetProcessHeap(), 0, contentType);
+ }
+ else
+ hr = E_OUTOFMEMORY;
+ return hr;
+ }
+
default:
FIXME("assocstr %d unimplemented!\n", str);
return E_NOTIMPL;
More information about the wine-cvs
mailing list