From 12bb6e481f98ec74267a6673fa3e460158d16a2d Mon Sep 17 00:00:00 2001 From: Huw Davies Date: Wed, 10 Sep 2008 14:11:29 +0100 Subject: [PATCH] inetcomm: Implement IMimeInternational_GetCharsetInfo. --- dlls/inetcomm/mimeintl.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/dlls/inetcomm/mimeintl.c b/dlls/inetcomm/mimeintl.c index a7a8313f56..2db5917e5f 100644 --- a/dlls/inetcomm/mimeintl.c +++ b/dlls/inetcomm/mimeintl.c @@ -207,8 +207,27 @@ static HRESULT WINAPI MimeInternat_FindCharset(IMimeInternational *iface, LPCSTR static HRESULT WINAPI MimeInternat_GetCharsetInfo(IMimeInternational *iface, HCHARSET hCharset, LPINETCSETINFO pCsetInfo) { - FIXME("stub\n"); - return E_NOTIMPL; + internat *This = impl_from_IMimeInternational( iface ); + HRESULT hr = MIME_E_INVALID_HANDLE; + charset_entry *charset; + + TRACE("(%p)->(%p, %p)\n", iface, hCharset, pCsetInfo); + + EnterCriticalSection(&This->cs); + + LIST_FOR_EACH_ENTRY(charset, &This->charsets, charset_entry, entry) + { + if(charset->cs_info.hCharset == hCharset) + { + *pCsetInfo = charset->cs_info; + hr = S_OK; + break; + } + } + + LeaveCriticalSection(&This->cs); + + return hr; } static HRESULT WINAPI MimeInternat_GetCodePageInfo(IMimeInternational *iface, CODEPAGEID cpiCodePage, -- 2.32.0.93.g670b81a890