inetcomm: Implement IMimeInternational_GetDefaultCharset.
This commit is contained in:
parent
3fe7ea127c
commit
8b68a6296c
|
@ -54,6 +54,7 @@ typedef struct
|
||||||
|
|
||||||
struct list charsets;
|
struct list charsets;
|
||||||
LONG next_charset_handle;
|
LONG next_charset_handle;
|
||||||
|
HCHARSET default_charset;
|
||||||
} internat;
|
} internat;
|
||||||
|
|
||||||
static inline internat *impl_from_IMimeInternational( IMimeInternational *iface )
|
static inline internat *impl_from_IMimeInternational( IMimeInternational *iface )
|
||||||
|
@ -116,8 +117,21 @@ static HRESULT WINAPI MimeInternat_SetDefaultCharset(IMimeInternational *iface,
|
||||||
|
|
||||||
static HRESULT WINAPI MimeInternat_GetDefaultCharset(IMimeInternational *iface, LPHCHARSET phCharset)
|
static HRESULT WINAPI MimeInternat_GetDefaultCharset(IMimeInternational *iface, LPHCHARSET phCharset)
|
||||||
{
|
{
|
||||||
FIXME("stub\n");
|
internat *This = impl_from_IMimeInternational( iface );
|
||||||
return E_NOTIMPL;
|
HRESULT hr = S_OK;
|
||||||
|
|
||||||
|
TRACE("(%p)->(%p)\n", iface, phCharset);
|
||||||
|
|
||||||
|
if(This->default_charset == NULL)
|
||||||
|
{
|
||||||
|
HCHARSET hcs;
|
||||||
|
hr = IMimeInternational_GetCodePageCharset(iface, GetACP(), CHARSET_BODY, &hcs);
|
||||||
|
if(SUCCEEDED(hr))
|
||||||
|
InterlockedCompareExchangePointer(&This->default_charset, hcs, NULL);
|
||||||
|
}
|
||||||
|
*phCharset = This->default_charset;
|
||||||
|
|
||||||
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT mlang_getcodepageinfo(UINT cp, MIMECPINFO *mlang_cp_info)
|
static HRESULT mlang_getcodepageinfo(UINT cp, MIMECPINFO *mlang_cp_info)
|
||||||
|
@ -389,6 +403,7 @@ HRESULT MimeInternational_Construct(IMimeInternational **internat)
|
||||||
|
|
||||||
list_init(&global_internat->charsets);
|
list_init(&global_internat->charsets);
|
||||||
global_internat->next_charset_handle = 0;
|
global_internat->next_charset_handle = 0;
|
||||||
|
global_internat->default_charset = NULL;
|
||||||
|
|
||||||
*internat = (IMimeInternational*)&global_internat->lpVtbl;
|
*internat = (IMimeInternational*)&global_internat->lpVtbl;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue