22#define NONAMELESSUNION
67 return CoCreateInstance(&CLSID_CMultiLanguage,
NULL, CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER,
68 &IID_IMultiLanguage, (
void **)ml);
76 IMimeInternational_AddRef( iface );
106 This->cs.DebugInfo->Spare[0] = 0;
118 TRACE(
"(%p)->(%p)\n", iface, hCharset);
133 TRACE(
"(%p)->(%p)\n", iface, phCharset);
138 hr = IMimeInternational_GetCodePageCharset(iface,
GetACP(), CHARSET_BODY, &hcs);
142 *phCharset =
This->default_charset;
156 hr = IMultiLanguage_GetCodePageInfo(ml,
cp, mlang_cp_info);
157 IMultiLanguage_Release(ml);
163 CHARSETTYPE ctCsetType,
164 LPHCHARSET phCharset)
167 MIMECPINFO mlang_cp_info;
169 TRACE(
"(%p)->(%d, %d, %p)\n", iface, cpiCodePage, ctCsetType, phCharset);
183 charset_nameW = mlang_cp_info.wszBodyCharset;
186 charset_nameW = mlang_cp_info.wszHeaderCharset;
189 charset_nameW = mlang_cp_info.wszWebCharset;
192 return MIME_E_INVALID_CHARSET_TYPE;
197 hr = IMimeInternational_FindCharset(iface, charset_name, phCharset);
216 hr = IMultiLanguage_GetCharsetInfo(ml, bstr, mlang_info);
217 IMultiLanguage_Release(ml);
230 charset->cs_info.cpiWindows = mlang_info->uiCodePage;
231 charset->cs_info.cpiInternet = mlang_info->uiInternetEncoding;
233 charset->cs_info.dwReserved1 = 0;
236 return charset->cs_info.hCharset;
240 LPHCHARSET phCharset)
256 *phCharset =
charset->cs_info.hCharset;
262 if(
hr == MIME_E_NOT_FOUND)
264 MIMECSETINFO mlang_info;
280 LPINETCSETINFO pCsetInfo)
286 TRACE(
"(%p)->(%p, %p)\n", iface, hCharset, pCsetInfo);
292 if(
charset->cs_info.hCharset == hCharset)
306 LPCODEPAGEINFO pCodePageInfo)
318 TRACE(
"(%p)->(%d, %d)\n", iface, cpiSource, cpiDest);
325 hr = IMultiLanguage_IsConvertible(ml, cpiSource, cpiDest);
326 IMultiLanguage_Release(ml);
334 LPPROPVARIANT pDecoded,
335 LPRFC1522INFO pRfc1522Info)
344 LPRFC1522INFO pRfc1522Info)
357 TRACE(
"(%p)->(%d, %d, %p, %p, %p)\n", iface, cpiSource, cpiDest, pIn, pOut, pcbRead);
393 IMultiLanguage_Release(ml);
400 CODEPAGEID cpiDest, LPPROPVARIANT pIn,
407 TRACE(
"(%p)->(%d, %d, %p %p)\n", iface, cpiSource, cpiDest, pIn, pOut);
413 src_len =
strlen(pIn->u.pszVal);
429 hr = IMultiLanguage_ConvertString(ml, &
mode, cpiSource, cpiDest, (
BYTE*)pIn->u.pszVal, &
in_size,
442 hr = IMultiLanguage_ConvertString(ml, &
mode, cpiSource, cpiDest, (
BYTE*)pIn->u.pszVal, &
in_size,
462 IMultiLanguage_Release(ml);
539 IMimeInternational_AddRef(*internat);
545 TRACE(
"(%p)\n", internat);
548 IMimeInternational_AddRef(*internat);
554 IMimeInternational *internat;
562 hr = IMimeInternational_FindCharset(internat,
name,
charset);
563 IMimeInternational_Release(internat);
570 IMimeInternational *internat;
573 TRACE(
"(%p, %p)\n", hCharset, pCsetInfo);
578 hr = IMimeInternational_GetCharsetInfo(internat, hCharset, pCsetInfo);
579 IMimeInternational_Release(internat);
586 IMimeInternational *internat;
594 hr = IMimeInternational_GetDefaultCharset(internat,
charset);
595 IMimeInternational_Release(internat);
ACPI_SIZE strlen(const char *String)
#define InterlockedIncrement
#define InterlockedDecrement
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static void list_remove(struct list_entry *entry)
static void list_add_head(struct list_entry *head, struct list_entry *entry)
static void list_init(struct list_entry *head)
#define UlongToHandle(ul)
#define HeapFree(x, y, z)
#define WideCharToMultiByte
#define MultiByteToWideChar
static HRESULT WINAPI MimeInternat_MLANG_ConvertInetReset(IMimeInternational *iface)
static HRESULT WINAPI MimeInternat_Rfc1522Decode(IMimeInternational *iface, LPCSTR pszValue, LPSTR pszCharset, ULONG cchmax, LPSTR *ppszDecoded)
static HRESULT WINAPI MimeInternat_ConvertBuffer(IMimeInternational *iface, CODEPAGEID cpiSource, CODEPAGEID cpiDest, LPBLOB pIn, LPBLOB pOut, ULONG *pcbRead)
static HRESULT WINAPI MimeInternat_DecodeHeader(IMimeInternational *iface, HCHARSET hCharset, LPCSTR pszData, LPPROPVARIANT pDecoded, LPRFC1522INFO pRfc1522Info)
static HRESULT mlang_getcsetinfo(const char *charset, MIMECSETINFO *mlang_info)
HRESULT WINAPI MimeOleFindCharset(LPCSTR name, LPHCHARSET charset)
static HRESULT WINAPI MimeInternat_CanConvertCodePages(IMimeInternational *iface, CODEPAGEID cpiSource, CODEPAGEID cpiDest)
static HCHARSET add_charset(struct list *list, MIMECSETINFO *mlang_info, HCHARSET handle)
HRESULT WINAPI MimeOleGetInternat(IMimeInternational **internat)
static IMimeInternationalVtbl mime_internat_vtbl
static HRESULT WINAPI MimeInternat_QueryInterface(IMimeInternational *iface, REFIID riid, LPVOID *ppobj)
static HRESULT WINAPI MimeInternat_MLANG_ConvertInetString(IMimeInternational *iface, CODEPAGEID cpiSource, CODEPAGEID cpiDest, LPCSTR pSource, int *pnSizeOfSource, LPSTR pDestination, int *pnDstSize)
static HRESULT WINAPI MimeInternat_ConvertString(IMimeInternational *iface, CODEPAGEID cpiSource, CODEPAGEID cpiDest, LPPROPVARIANT pIn, LPPROPVARIANT pOut)
HRESULT MimeInternational_Construct(IMimeInternational **internat)
static ULONG WINAPI MimeInternat_AddRef(IMimeInternational *iface)
static HRESULT WINAPI MimeInternat_GetCodePageInfo(IMimeInternational *iface, CODEPAGEID cpiCodePage, LPCODEPAGEINFO pCodePageInfo)
static HRESULT WINAPI MimeInternat_GetDefaultCharset(IMimeInternational *iface, LPHCHARSET phCharset)
static HRESULT WINAPI MimeInternat_GetCharsetInfo(IMimeInternational *iface, HCHARSET hCharset, LPINETCSETINFO pCsetInfo)
static HRESULT WINAPI MimeInternat_GetCodePageCharset(IMimeInternational *iface, CODEPAGEID cpiCodePage, CHARSETTYPE ctCsetType, LPHCHARSET phCharset)
static HRESULT get_mlang(IMultiLanguage **ml)
static HRESULT WINAPI MimeInternat_FindCharset(IMimeInternational *iface, LPCSTR pszCharset, LPHCHARSET phCharset)
static HRESULT WINAPI MimeInternat_SetDefaultCharset(IMimeInternational *iface, HCHARSET hCharset)
static HRESULT mlang_getcodepageinfo(UINT cp, MIMECPINFO *mlang_cp_info)
static internat_impl * global_internat
static HRESULT WINAPI MimeInternat_Rfc1522Encode(IMimeInternational *iface, LPCSTR pszValue, HCHARSET hCharset, LPSTR *ppszEncoded)
static internat_impl * impl_from_IMimeInternational(IMimeInternational *iface)
HRESULT WINAPI MimeOleGetDefaultCharset(LPHCHARSET charset)
static ULONG WINAPI MimeInternat_Release(IMimeInternational *iface)
HRESULT WINAPI MimeOleGetCharsetInfo(HCHARSET hCharset, LPINETCSETINFO pCsetInfo)
static HRESULT WINAPI MimeInternat_EncodeHeader(IMimeInternational *iface, HCHARSET hCharset, LPPROPVARIANT pData, LPSTR *ppszEncoded, LPRFC1522INFO pRfc1522Info)
int WINAPI lstrcmpiA(LPCSTR str1, LPCSTR str2)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
#define InterlockedExchangePointer(Target, Value)
VOID WINAPI CoTaskMemFree(LPVOID ptr)
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
#define InterlockedCompareExchangePointer
static HANDLE PIO_APC_ROUTINE PVOID PIO_STATUS_BLOCK ULONG PVOID ULONG PVOID ULONG out_size
static HANDLE PIO_APC_ROUTINE PVOID PIO_STATUS_BLOCK ULONG PVOID ULONG in_size
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
#define IsEqualGUID(rguid1, rguid2)
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
DWORD_PTR Spare[8/sizeof(DWORD_PTR)]
PCRITICAL_SECTION_DEBUG DebugInfo
IMimeInternational IMimeInternational_iface
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
#define CONTAINING_RECORD(address, type, field)
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)