Module: wine Branch: master Commit: 3093023979f245e67d4123f79d273b5fb08e7b0b URL: http://source.winehq.org/git/wine.git/?a=commit;h=3093023979f245e67d4123f79d...
Author: Huw Davies huw@codeweavers.com Date: Tue Sep 23 12:07:43 2008 +0100
inetcomm: Add wrapper functions MimeOleFindCharset and MimeOleGetDefaultCharset.
---
dlls/inetcomm/inetcomm.spec | 4 ++-- dlls/inetcomm/mimeintl.c | 34 +++++++++++++++++++++++++++++++++- 2 files changed, 35 insertions(+), 3 deletions(-)
diff --git a/dlls/inetcomm/inetcomm.spec b/dlls/inetcomm/inetcomm.spec index 4db2c7d..86669c8 100644 --- a/dlls/inetcomm/inetcomm.spec +++ b/dlls/inetcomm/inetcomm.spec @@ -59,7 +59,7 @@ @ stub MimeOleDecodeHeader @ stub MimeOleEncodeHeader @ stub MimeOleFileTimeToInetDate -@ stub MimeOleFindCharset +@ stdcall MimeOleFindCharset(str ptr) @ stub MimeOleGenerateCID @ stub MimeOleGenerateFileName @ stub MimeOleGenerateMID @@ -71,7 +71,7 @@ @ stub MimeOleGetCodePageCharset @ stub MimeOleGetCodePageInfo @ stub MimeOleGetContentTypeExt -@ stub MimeOleGetDefaultCharset +@ stdcall MimeOleGetDefaultCharset(ptr) @ stub MimeOleGetExtContentType @ stub MimeOleGetFileExtension @ stub MimeOleGetFileInfo diff --git a/dlls/inetcomm/mimeintl.c b/dlls/inetcomm/mimeintl.c index 0029af8..6d37147 100644 --- a/dlls/inetcomm/mimeintl.c +++ b/dlls/inetcomm/mimeintl.c @@ -547,6 +547,22 @@ HRESULT WINAPI MimeOleGetInternat(IMimeInternational **internat) return S_OK; }
+HRESULT WINAPI MimeOleFindCharset(LPCSTR name, LPHCHARSET charset) +{ + IMimeInternational *internat; + HRESULT hr; + + TRACE("(%s, %p)\n", debugstr_a(name), charset); + + hr = MimeOleGetInternat(&internat); + if(SUCCEEDED(hr)) + { + hr = IMimeInternational_FindCharset(internat, name, charset); + IMimeInternational_Release(internat); + } + return hr; +} + HRESULT WINAPI MimeOleGetCharsetInfo(HCHARSET hCharset, LPINETCSETINFO pCsetInfo) { IMimeInternational *internat; @@ -560,5 +576,21 @@ HRESULT WINAPI MimeOleGetCharsetInfo(HCHARSET hCharset, LPINETCSETINFO pCsetInfo hr = IMimeInternational_GetCharsetInfo(internat, hCharset, pCsetInfo); IMimeInternational_Release(internat); } - return S_OK; + return hr; +} + +HRESULT WINAPI MimeOleGetDefaultCharset(LPHCHARSET charset) +{ + IMimeInternational *internat; + HRESULT hr; + + TRACE("(%p)\n", charset); + + hr = MimeOleGetInternat(&internat); + if(SUCCEEDED(hr)) + { + hr = IMimeInternational_GetDefaultCharset(internat, charset); + IMimeInternational_Release(internat); + } + return hr; }