?? mlang.idl
字號:
[
object,
uuid(d66d6f98-cdaa-11d0-b822-00c04fc9b31f),
pointer_default(unique)
]
interface IMLangConvertCharset : IUnknown
{
typedef enum tagMLCONVCHARF
{
MLCONVCHARF_AUTODETECT = 1,
MLCONVCHARF_ENTITIZE = 2
} MLCONVCHAR;
typedef [unique] IMLangConvertCharset *LPMLANGCONVERTCHARSET;
HRESULT Initialize
(
[in] UINT uiSrcCodePage,
[in] UINT uiDstCodePage,
[in] DWORD dwProperty
);
HRESULT GetSourceCodePage
(
[out] UINT *puiSrcCodePage
);
HRESULT GetDestinationCodePage
(
[out] UINT *puiDstCodePage
);
HRESULT GetProperty
(
[out] DWORD *pdwProperty
);
HRESULT DoConversion
(
[in] BYTE *pSrcStr,
[in,out] UINT *pcSrcSize,
[in] BYTE *pDstStr,
[in,out] UINT *pcDstSize
);
HRESULT DoConversionToUnicode
(
[in] CHAR *pSrcStr,
[in,out] UINT *pcSrcSize,
[in] WCHAR *pDstStr,
[in,out] UINT *pcDstSize
);
HRESULT DoConversionFromUnicode
(
[in] WCHAR *pSrcStr,
[in,out] UINT *pcSrcSize,
[in] CHAR *pDstStr,
[in,out] UINT *pcDstSize
);
};
[
uuid(d66d6f99-cdaa-11d0-b822-00c04fc9b31f),
]
coclass CMLangConvertCharset
{
[default] interface IMLangConvertCharset;
};
[
object,
uuid(275c23e1-3747-11d0-9fea-00aa003f8646),
pointer_default(unique)
]
interface IMultiLanguage : IUnknown
{
typedef [unique] IMultiLanguage *LPMULTILANGUAGE;
HRESULT GetNumberOfCodePageInfo
(
[out] UINT *pcCodePage
);
HRESULT GetCodePageInfo
(
[in] UINT uiCodePage,
[out] PMIMECPINFO pCodePageInfo
);
HRESULT GetFamilyCodePage
(
[in] UINT uiCodePage,
[out] UINT *puiFamilyCodePage
);
HRESULT EnumCodePages
(
[in] DWORD grfFlags,
[out] IEnumCodePage **ppEnumCodePage
);
HRESULT GetCharsetInfo
(
[in] BSTR Charset,
[out] PMIMECSETINFO pCharsetInfo
);
HRESULT IsConvertible
(
[in] DWORD dwSrcEncoding,
[in] DWORD dwDstEncoding
);
HRESULT ConvertString
(
[in,out] DWORD *pdwMode,
[in] DWORD dwSrcEncoding,
[in] DWORD dwDstEncoding,
[in] BYTE *pSrcStr,
[in,out] UINT *pcSrcSize,
[in] BYTE *pDstStr,
[in,out] UINT *pcDstSize
);
HRESULT ConvertStringToUnicode
(
[in,out] DWORD *pdwMode,
[in] DWORD dwEncoding,
[in] CHAR *pSrcStr,
[in,out] UINT *pcSrcSize,
[in] WCHAR *pDstStr,
[in,out] UINT *pcDstSize
);
HRESULT ConvertStringFromUnicode
(
[in,out] DWORD *pdwMode,
[in] DWORD dwEncoding,
[in] WCHAR *pSrcStr,
[in,out] UINT *pcSrcSize,
[in] CHAR *pDstStr,
[in,out] UINT *pcDstSize
);
HRESULT ConvertStringReset();
HRESULT GetRfc1766FromLcid
(
[in] LCID Locale,
[out] BSTR *pbstrRfc1766
);
HRESULT GetLcidFromRfc1766
(
[out] LCID *pLocale,
[in] BSTR bstrRfc1766
);
HRESULT EnumRfc1766
(
[out] IEnumRfc1766 **ppEnumRfc1766
);
HRESULT GetRfc1766Info
(
[in] LCID Locale,
[out] PRFC1766INFO pRfc1766Info
);
HRESULT CreateConvertCharset
(
[in] UINT uiSrcCodePage,
[in] UINT uiDstCodePage,
[in] DWORD dwProperty,
[out] IMLangConvertCharset **ppMLangConvertCharset
);
};
[
uuid(359F3443-BD4A-11D0-B188-00AA0038C969),
helpstring("IMLangCodePages Interface"),
pointer_default(unique)
]
interface IMLangCodePages : IUnknown
{
typedef [unique] IMLangCodePages* PMLANGCODEPAGES;
[helpstring("method GetCharCodePages")] HRESULT GetCharCodePages([in] WCHAR chSrc, [out] DWORD* pdwCodePages);
[helpstring("method GetStrCodePages")] HRESULT GetStrCodePages([in, size_is(cchSrc)] const WCHAR* pszSrc, [in] long cchSrc, [in] DWORD dwPriorityCodePages, [out] DWORD* pdwCodePages, [out] long* pcchCodePages);
[helpstring("method CodePageToCodePages")] HRESULT CodePageToCodePages([in] UINT uCodePage, [out] DWORD* pdwCodePages);
[helpstring("method CodePagesToCodePage")] HRESULT CodePagesToCodePage([in] DWORD dwCodePages, [in] UINT uDefaultCodePage, [out] UINT* puCodePage);
};
[
uuid(359F3441-BD4A-11D0-B188-00AA0038C969),
helpstring("IMLangFontLink Interface"),
pointer_default(unique)
]
interface IMLangFontLink : IMLangCodePages
{
typedef [unique] IMLangFontLink* PMLANGFONTLINK;
[helpstring("method GetFontCodePages")] HRESULT GetFontCodePages([in] HDC hDC, [in] HFONT hFont, [out] DWORD* pdwCodePages);
[helpstring("method MapFont")] HRESULT MapFont([in] HDC hDC, [in] DWORD dwCodePages, [in] HFONT hSrcFont, [out] HFONT* phDestFont);
[helpstring("method ReleaseFont")] HRESULT ReleaseFont([in] HFONT hFont);
[helpstring("method ResetFontMapping")] HRESULT ResetFontMapping();
};
[
uuid(275c23e2-3747-11d0-9fea-00aa003f8646),
]
coclass CMultiLanguage
{
[default] interface IMultiLanguage;
interface IMLangCodePages;
interface IMLangFontLink;
interface IMLangLineBreakConsole;
};
}
cpp_quote("#ifndef _MLANG_H_API_DEF_ ")
cpp_quote("#define _MLANG_H_API_DEF_ ")
cpp_quote(" ")
cpp_quote("// APIs prototypes ")
cpp_quote("STDAPI LcidToRfc1766A(LCID Locale, LPSTR pszRfc1766, int iMaxLength); ")
cpp_quote("STDAPI LcidToRfc1766W(LCID Locale, LPWSTR pszRfc1766, int nChar); ")
cpp_quote("#ifdef UNICODE ")
cpp_quote("#define LcidToRfc1766 LcidToRfc1766W ")
cpp_quote("#else ")
cpp_quote("#define LcidToRfc1766 LcidToRfc1766A ")
cpp_quote("#endif ")
cpp_quote("STDAPI Rfc1766ToLcidA(LCID *pLocale, LPCSTR pszRfc1766); ")
cpp_quote("STDAPI Rfc1766ToLcidW(LCID *pLocale, LPCWSTR pszRfc1766); ")
cpp_quote("#ifdef UNICODE ")
cpp_quote("#define Rfc1766ToLcid Rfc1766ToLcidW ")
cpp_quote("#else ")
cpp_quote("#define Rfc1766ToLcid Rfc1766ToLcidA ")
cpp_quote("#endif ")
cpp_quote(" ")
cpp_quote("STDAPI IsConvertINetStringAvailable(DWORD dwSrcEncoding, DWORD dwDstEncoding);")
cpp_quote("STDAPI ConvertINetString(LPDWORD lpdwMode, DWORD dwSrcEncoding, DWORD dwDstEncoding, LPCSTR lpSrcStr, LPINT lpnSrcSize, LPSTR lpDstStr, LPINT lpnDstSize); ")
cpp_quote("STDAPI ConvertINetMultiByteToUnicode(LPDWORD lpdwMode, DWORD dwEncoding, LPCSTR lpSrcStr, LPINT lpnMultiCharCount, LPWSTR lpDstStr, LPINT lpnWideCharCount); ")
cpp_quote("STDAPI ConvertINetUnicodeToMultiByte(LPDWORD lpdwMode, DWORD dwEncoding, LPCWSTR lpSrcStr, LPINT lpnWideCharCount, LPSTR lpDstStr, LPINT lpnMultiCharCount); ")
cpp_quote(" ")
cpp_quote("#endif // _MLANG_H_API_DEF_ ")
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -