Enum MLSTR_FLAGS
	MLSTR_READ	= 1
	MLSTR_WRITE	= 2
End Enum

Const CPIOD_PEEK = &h40000000
Const CPIOD_FORCE_PROMPT = &h80000000

Dim LIBID_MultiLanguage = [&hE0235C27, &h4737, &hD011, [&h9F, &hEA, &h00, &hAA, &h00, &h3F, &h86, &h46]] As GUID

'以下のものは省略
Interface IMLangStringBufW : Inherits IUnknown : End Interface
Interface IMLangStringBufA : Inherits IUnknown : End Interface
Interface IMLangString : Inherits IUnknown : End Interface
Interface IMLangStringWStr : Inherits IUnknown : End Interface
Interface IMLangStringAStr : Inherits IUnknown : End Interface

/* interface IMLangLineBreakConsole */
/* [object][unique][helpstring][uuid] */

Dim IMLangLineBreakConsole = [&hF5BE2EE1, &hBFD7, &h11D0, [&hB1, &h88, &h00, &hAA, &h00, &h38, &hC9, &h69]] As IID

Interface IMLangLineBreakConsole
	Inherits IUnknown

	/* [helpstring] */ Function BreakLineML(
		/* [in] */ pSrcMLStr As IMLangString,
		/* [in] */ lSrcPos As Long,
		/* [in] */ lSrcLen As Long,
		/* [in] */ cMinColumns As Long,
		/* [in] */ cMaxColumns As Long,
		/* [out] */ ByRef lLineLen As Long,
		/* [out] */ ByRef lSkipLen As Long) As HRESULT
	/* [helpstring] */ Function BreakLineW(
		/* [in] */ locale As LCID,
		/* [size_is][in] */ pszSrc As PCWSTR,
		/* [in] */ cchSrc As Long,
		/* [in] */ cMaxColumns As Long,
		/* [out] */ ByRef cchLine As Long,
		/* [out] */ ByRef cchSkip As Long) As HRESULT
	/* [helpstring] */ Function BreakLineA(
		/* [in] */ locale As LCID,
		/* [in] */ uCodePage As DWord,
		/* [size_is][in] */ pszSrc As PCSTR,
		/* [in] */ cchSrc As Long,
		/* [in] */ cMaxColumns As Long,
		/* [out] */ ByRef cchLine As Long,
		/* [out] */ ByRef cchSkip As Long) As HRESULT

End Interface

/* interface IEnumCodePage */
/* [unique][uuid][object] */

Const MAX_MIMECP_NAME = 64

Const MAX_MIMECSET_NAME = 50

Const MAX_MIMEFACE_NAME = 32

Const Enum MIMECONTF
	MIMECONTF_MAILNEWS 	= &h1
	MIMECONTF_BROWSER = &h2
	MIMECONTF_MINIMAL = &h4
	MIMECONTF_IMPORT = &h8
	MIMECONTF_SAVABLE_MAILNEWS = &h100
	MIMECONTF_SAVABLE_BROWSER = &h200
	MIMECONTF_EXPORT = &h400
	MIMECONTF_PRIVCONVERTER = &h10000
	MIMECONTF_VALID = &h20000
	MIMECONTF_VALID_NLS = &h40000
	MIMECONTF_MIME_IE4 = &h10000000
	MIMECONTF_MIME_LATEST = &h20000000
	MIMECONTF_MIME_REGISTRY = &h40000000
End Enum

Type MIMECPINFO
	dwFlags As DWord
	uiCodePage As DWord
	uiFamilyCodePage As DWord
	wszDescription[ELM(64)] As WCHAR
	wszWebCharset[ELM(50)] As WCHAR
	wszHeaderCharset[ELM(50)] As WCHAR
	wszBodyCharset[ELM(50)] As WCHAR
	wszFixedWidthFont[ELM(32)] As WCHAR
	wszProportionalFont[ELM(32)] As WCHAR
	bGDICharset As Byte
End Type

Type MIMECSETINFO
	uiCodePage As DWord
	uiInternetEncoding As DWord
	wszCharset[ELM(50)] As WCHAR
End Type

Dim IID_IEnumCodePage = [&h275c23e3, &h3747, &h11d0, [&h9f, &hea, &h00, &haa, &h00, &h3f, &h86, &h46]] As IID

Interface IEnumCodePage
	Inherits IUnknown

	Function Clone(
		/* [out] */ ByRef Enum_ As IEnumCodePage) As HRESULT
	Function Next_(
		/* [in] */ celt As DWord,
		/* [out] */ rgelt As *MIMECPINFO,
		/* [out] */ ByRef celtFetched As DWord) As HRESULT
	Function Reset() As HRESULT
	Function Skip(
		/* [in] */ celt As DWord) As HRESULT
End Interface

/* interface IEnumRfc1766 */
/* [unique][uuid][object] */

Const MAX_RFC1766_NAME = 6

Const MAX_LOCALE_NAME = 32

Type RFC1766INFO
	lcid As LCID
	wszRfc1766[ELM(6)] As WCHAR
	wszLocaleName[ELM(32)] As WCHAR
End Type

Dim IID_IEnumRfc1766 = [&h3dc39d1d, &hc030, &h11d0, [&hb8, &h1b, &h00, &hc0, &h4f, &hc9, &hb3, &h1f]] As IID

Interface IEnumRfc1766
	Inherits IUnknown

	Function Clone(
		/* [out] */ ByRef Enum_ As IEnumRfc1766) As HRESULT
	Function Next_(
		/* [in] */ celt As DWord,
		/* [out] */ rgelt As *RFC1766INFO,
		/* [out] */ ByRef celtFetched As DWord) As HRESULT
	Function Reset() As HRESULT
	Function Skip(
		/* [in] */ celt As DWord) As HRESULT
End Interface

/* interface IEnumScript */
/* [unique][uuid][object] */

Const MAX_SCRIPT_NAME = 48

TypeDef SCRIPT_ID = BYTE

TypeDef SCRIPT_IDS = Int64

Enum SCRIPTCONTF
	sidDefault	= 0
	sidMerge
	sidAsciiSym
	sidAsciiLatin
	sidLatin
	sidGreek
	sidCyrillic
	sidArmenian
	sidHebrew
	sidArabic
	sidDevanagari
	sidBengali
	sidGurmukhi
	sidGujarati
	sidOriya
	sidTamil
	sidTelugu
	sidKannada
	sidMalayalam
	sidThai
	sidLao
	sidTibetan
	sidGeorgian
	sidHangul
	sidKana
	sidBopomofo
	sidHan
	sidEthiopic
	sidCanSyllabic
	sidCherokee
	sidYi
	sidBraille
	sidRunic
	sidOgham
	sidSinhala
	sidSyriac
	sidBurmese
	sidKhmer
	sidThaana
	sidMongolian
	sidUserDefined
	sidLim
	sidFEFirst = sidHangul
	sidFELast = sidHan
End Enum

Type SCRIPTINFO
	ScriptId As SCRIPT_ID
	uiCodePage As DWord
	wszDescription[ELM(48)] As WCHAR
	wszFixedWidthFont[ELM(32)] As WCHAR
	wszProportionalFont[ELM(32)] As WCHAR
End Type

Dim IID_IEnumScript = [&hAE5F1430, &h388B, &h11d2, [&h83, &h80, &h00, &hC0, &h4F, &h8F, &h5D, &hA1]] As IID

Interface IEnumScript
	Inherits IUnknown

	Function Clone(
		/* [out] */ ByRef Enum_ As IEnumScript) As HRESULT
	Function Next_(
		/* [in] */ celt As DWord,
		/* [out] */ rgelt As *SCRIPTINFO,
		/* [out] */ ByRef celtFetched As DWord) As HRESULT
	Function Reset() As HRESULT
	Function Skip(
		/* [in] */ celt As DWord) As HRESULT
End Interface

/* interface IMLangConvertCharset */
/* [unique][uuid][object] */

Const Enum MLCONVCHAR
	MLCONVCHARF_AUTODETECT = 1
	MLCONVCHARF_ENTITIZE = 2
	MLCONVCHARF_NCR_ENTITIZE = 2
	MLCONVCHARF_NAME_ENTITIZE = 4
	MLCONVCHARF_USEDEFCHAR = 8
	MLCONVCHARF_NOBESTFITCHARS = 16
	MLCONVCHARF_DETECTJPN = 32
End Enum

Const Enum MLCP
	MLDETECTF_MAILNEWS = &h1
	MLDETECTF_BROWSER = &h2
	MLDETECTF_VALID = &h4
	MLDETECTF_VALID_NLS = &h8
	MLDETECTF_PRESERVE_ORDER = &h10
	MLDETECTF_PREFERRED_ONLY = &h20
	MLDETECTF_FILTER_SPECIALCHAR = &h40
	MLDETECTF_EURO_UTF8 = &h80
End Enum

Dim IID_IMLangConvertCharset = [&hd66d6f98, &hcdaa, &h11d0, [&hb8, &h22, &h00, &hc0, &h4f, &hc9, &hb3, &h1f]] As IID

Interface IMLangConvertCharset
	Inherits IUnknown

	Function Initialize(
		/* [in] */ uiSrcCodePage As DWord,
		/* [in] */ uiDstCodePage As DWord,
		/* [in] */ dwProperty As DWord) As HRESULT
	Function GetSourceCodePage(
		/* [out] */ ByRef uiSrcCodePage As DWord) As HRESULT
	Function GetDestinationCodePage(
		/* [out] */ ByRef uiDstCodePage As DWord) As HRESULT
	Function GetProperty(
		/* [out] */ ByRef dwProperty As DWord) As HRESULT
	Function DoConversion(
		/* [in] */ pSrcStr As *Byte,
		/* [out][in] */ ByRef cSrcSize As DWord,
		/* [in] */ pDstStr As *Byte,
		/* [out][in] */ ByRef cDstSize As DWord) As HRESULT
	Function DoConversionToUnicode(
		/* [in] */ pSrcStr As *CHAR,
		/* [out][in] */ ByRef cSrcSize As DWord,
		/* [in] */ pDstStr As *WCHAR,
		/* [out][in] */ ByRef cDstSize As DWord) As HRESULT
	Function DoConversionFromUnicode(
		/* [in] */ pSrcStr As *WCHAR,
		/* [out][in] */ ByRef cSrcSize As DWord,
		/* [in] */ pDstStr As *CHAR,
		/* [out][in] */ ByRef cDstSize As DWord) As HRESULT
End Interface

Dim CLSID_CMLangConvertCharset = [&hd66d6f99, &hcdaa, &h11d0, [&hb8, &h22, &h00, &hc0, &h4f, &hc9, &hb3, &h1f]] As CLSID

/* interface IMultiLanguage */
/* [unique][uuid][object] */

Dim IID_IMultiLanguage = [&h275c23e1, &h3747, &h11d0, [&h9f, &hea, &h00, &haa, &h00, &h3f, &h86, &h46]] As IID

Interface IMultiLanguage
	Inherits IUnknown

	Function GetNumberOfCodePageInfo(
		/* [out] */ ByRef cCodePage As DWord) As HRESULT
	Function GetCodePageInfo(
		/* [in] */ uiCodePage As DWord,
		/* [out] */ ByRef CodePageInfo As MIMECPINFO) As HRESULT
	Function GetFamilyCodePage(
		/* [in] */ uiCodePage As DWord,
		/* [out] */ ByRef uiFamilyCodePage As DWord) As HRESULT
	Function EnumCodePages(
		/* [in] */ grfFlags As DWord,
		/* [out] */ ByRef EnumCodePage As IEnumCodePage) As HRESULT
	Function GetCharsetInfo(
		/* [in] */ Charset As BSTR,
		/* [out] */ ByRef CharsetInfo As MIMECSETINFO) As HRESULT
	Function IsConvertible(
		/* [in] */ dwSrcEncoding As DWord,
		/* [in] */ dwDstEncoding As DWord) As HRESULT
	Function ConvertString(
		/* [out][in] */ ByRef dwMode As DWord,
		/* [in] */ dwSrcEncoding As DWord,
		/* [in] */ dwDstEncoding As DWord,
		/* [in] */ pSrcStr As *Byte,
		/* [out][in] */ ByRef cSrcSize As DWord,
		/* [in] */ pDstStr As *Byte,
		/* [out][in] */ ByRef cDstSize As DWord) As HRESULT
	Function ConvertStringToUnicode(
		/* [out][in] */ ByRef dwMode As DWord,
		/* [in] */ dwEncoding As DWord,
		/* [in] */ pSrcStr As *CHAR,
		/* [out][in] */ ByRef cSrcSize As DWord,
		/* [in] */ pDstStr As *WCHAR,
		/* [out][in] */ ByRef cDstSize As DWord) As HRESULT
	Function ConvertStringFromUnicode(
		/* [out][in] */ ByRef dwMode As DWord,
		/* [in] */ dwEncoding As DWord,
		/* [in] */ pSrcStr As *WCHAR,
		/* [out][in] */ ByRef cSrcSize As DWord,
		/* [in] */ pDstStr As *CHAR,
		/* [out][in] */ ByRef cDstSize As DWord) As HRESULT
	Function ConvertStringReset() As HRESULT
	Function GetRfc1766FromLcid(
		/* [in] */ Locale As LCID,
		/* [out] */ ByRef bstrRfc1766 As BSTR) As HRESULT
	Function GetLcidFromRfc1766(
		/* [out] */ ByRef Locale As LCID,
		/* [in] */ bstrRfc1766 As BSTR) As HRESULT
	Function EnumRfc1766(
		/* [out] */ ByRef EnumRfc1766 As IEnumRfc1766) As HRESULT
	Function GetRfc1766Info(
		/* [in] */ Locale As LCID,
		/* [out] */ ByRef Rfc1766Info As RFC1766INFO) As HRESULT
	Function CreateConvertCharset(
		/* [in] */ uiSrcCodePage As DWord,
		/* [in] */ uiDstCodePage As DWord,
		/* [in] */ dwProperty As DWord,
		/* [out] */ ByRef MLangConvertCharset As IMLangConvertCharset) As HRESULT
End Interface

/* interface IMultiLanguage2 */
/* [local][unique][uuid][object] */

Const Enum MLDETECTCP
	MLDETECTCP_NONE = 0
	MLDETECTCP_7BIT = 1
	MLDETECTCP_8BIT = 2
	MLDETECTCP_DBCS = 4
	MLDETECTCP_HTML = 8
	MLDETECTCP_NUMBER = 16
End Enum

Type DetectEncodingInfo
	nLangID As DWord
	nCodePage As DWord
	nDocPercent As Long
	nConfidence As Long
End Type

Const Enum SCRIPTFONTCONTF
	SCRIPTCONTF_FIXED_FONT = &h1
	SCRIPTCONTF_PROPORTIONAL_FONT = &h2
	SCRIPTCONTF_SCRIPT_USER = &h10000
	SCRIPTCONTF_SCRIPT_HIDE = &h20000
	SCRIPTCONTF_SCRIPT_SYSTEM = &h40000
End Enum

Type SCRIPTFONTINFO
	scripts As SCRIPT_IDS
	wszFont[ELM(32)] As WCHAR
End Type

Dim IID_IMultiLanguage2 = [&hDCCFC164, &h2B38, &h11d2, [&hB7, &hEC, &h00, &hC0, &h4F, &h8F, &h5D, &h9A]] As IID

Interface IMultiLanguage2
	Inherits IUnknown

	Function GetNumberOfCodePageInfo(
		/* [out] */ ByRef cCodePage As DWord) As HRESULT
	Function GetCodePageInfo(
		/* [in] */ uiCodePage As DWord,
		/* [in] */ LangId As LANGID,
		/* [out] */ ByRef CodePageInfo As MIMECPINFO) As HRESULT
	Function GetFamilyCodePage(
		/* [in] */ uiCodePage As DWord,
		/* [out] */ ByRef uiFamilyCodePage As DWord) As HRESULT
	Function EnumCodePages(
		/* [in] */ grfFlags As DWord,
		/* [in] */ LangId As LANGID,
		/* [out] */ ByRef EnumCodePage As IEnumCodePage) As HRESULT
	Function GetCharsetInfo(
		/* [in] */ Charset As BSTR,
		/* [out] */ ByRef CharsetInfo As MIMECSETINFO) As HRESULT
	Function IsConvertible(
		/* [in] */ dwSrcEncoding As DWord,
		/* [in] */ dwDstEncoding As DWord) As HRESULT
	Function ConvertString(
		/* [out][in] */ ByRef dwMode As DWord,
		/* [in] */ dwSrcEncoding As DWord,
		/* [in] */ dwDstEncoding As DWord,
		/* [in] */ pSrcStr As *Byte,
		/* [out][in] */ ByRef cSrcSize As DWord,
		/* [in] */ pDstStr As *Byte,
		/* [out][in] */ ByRef cDstSize As DWord) As HRESULT
	Function ConvertStringToUnicode(
		/* [out][in] */ ByRef dwMode As DWord,
		/* [in] */ dwEncoding As DWord,
		/* [in] */ pSrcStr As PCSTR,
		/* [out][in] */ ByRef cSrcSize As DWord,
		/* [in] */ pDstStr As PWSTR,
		/* [out][in] */ ByRef cDstSize As DWord) As HRESULT
	Function ConvertStringFromUnicode(
		/* [out][in] */ ByRef dwMode As DWord,
		/* [in] */ dwEncoding As DWord,
		/* [in] */ pSrcStr As PCWSTR,
		/* [out][in] */ ByRef cSrcSize As DWord,
		/* [in] */ pDstStr As PSTR,
		/* [out][in] */ ByRef cDstSize As DWord) As HRESULT
	Function ConvertStringReset() As HRESULT
	Function GetRfc1766FromLcid(
		/* [in] */ Locale As LCID,
		/* [out] */ ByRef bstrRfc1766 As BSTR) As HRESULT
	Function GetLcidFromRfc1766(
		/* [out] */ ByRef Locale As LCID,
		/* [in] */ bstrRfc1766 As BSTR) As HRESULT
	Function EnumRfc1766(
		/* [in] */ LangId As LANGID,
		/* [out] */ ByRef EnumRfc1766 As IEnumRfc1766) As HRESULT
	Function GetRfc1766Info(
		/* [in] */ LangId As LANGID,
		/* [in] */ Locale As LCID,
		/* [out] */ ByRef Rfc1766Info As RFC1766INFO) As HRESULT
	Function CreateConvertCharset(
		/* [in] */ uiSrcCodePage As DWord,
		/* [in] */ uiDstCodePage As DWord,
		/* [in] */ dwProperty As DWord,
		/* [out] */ ByRef MLangConvertCharset As IMLangConvertCharset) As HRESULT
	Function ConvertStringInIStream(
		/* [out][in] */ ByRef dwMode As DWord,
		/* [in] */ dwFlag As DWord,
		/* [in] */ lpFallBack As *WCHAR,
		/* [in] */ dwSrcEncoding As DWord,
		/* [in] */ dwDstEncoding As DWord,
		/* [in] */ stmIn As IStream,
		/* [in] */ stmOut As IStream) As HRESULT
	Function ConvertStringToUnicodeEx(
		/* [out][in] */ ByRef dwMode As DWord,
		/* [in] */ dwFlag As DWord,
		/* [in] */ pSrcStr As *CHAR,
		/* [out][in] */ ByRef cSrcSize As DWord,
		/* [in] */ pDstStr As *WCHAR,
		/* [out][in] */ ByRef cDstSize As DWord,
		/* [in] */ dwFlag As DWord,
		/* [in] */ lpFallBack As *WCHAR) As HRESULT
	Function ConvertStringFromUnicodeEx(
		/* [out][in] */ ByRef dwMode As DWord,
		/* [in] */ dwFlag As DWord,
		/* [in] */ pSrcStr As *WCHAR,
		/* [out][in] */ ByRef cSrcSize As DWord,
		/* [in] */ pDstStr As *CHAR,
		/* [out][in] */ ByRef cDstSize As DWord,
		/* [in] */ dwFlag As DWord,
		/* [in] */ lpFallBack As *WCHAR) As HRESULT
	Function DetectCodepageInIStream(
		/* [in] */ dwFlag As DWord,
		/* [in] */ dwPrefWinCodePage As DWord,
		/* [in] */ stmIn As IStream,
		/* [out][in] */ ByRef Encoding As DetectEncodingInfo,
		/* [out][in] */ ByRef nScores As Long) As HRESULT
	Function DetectInputCodepage(
		/* [in] */ dwFlag As DWord,
		/* [in] */ dwPrefWinCodePage As DWord,
		/* [in] */ pSrcStr As *CHAR,
		/* [out][in] */ ByRef cSrcSize As Long,
		/* [out][in] */ ByRef Encoding As DetectEncodingInfo,
		/* [out][in] */ ByRef nScores As Long) As HRESULT
	Function ValidateCodePage(
		/* [in] */ uiCodePage As DWord,
		/* [in] */ hwnd As HWND) As HRESULT
	Function GetCodePageDescription(
		/* [in] */ uiCodePage As DWord,
		/* [in] */ lcid As LCID,
		/* [size_is][out][in] */ lpWideCharStr As LPWSTR,
		/* [in] */ cchWideChar As Long) As HRESULT
	Function IsCodePageInstallable(
		/* [in] */ uiCodePage As DWord) As HRESULT
	Function SetMimeDBSource(
		/* [in] */ dwSource As MIMECONTF) As HRESULT
	Function GetNumberOfScripts(
		/* [out] */ ByRef nScripts As DWord) As HRESULT
	Function EnumScripts(
		/* [in] */ dwFlags As DWORD,
		/* [in] */ LangId As LANGID,
		/* [out] */ ByRef EnumScript As IEnumScript) As HRESULT
	Function ValidateCodePageEx(
		/* [in] */ uiCodePage As DWord,
		/* [in] */ hwnd As HWND,
		/* [in] */ dwfIODControl As DWord) As HRESULT
End Interface

/* interface IMLangCodePages */
/* [object][unique][helpstring][uuid] */

Dim IID_IMLangCodePages = [&h359F3443, &hBD4A, &h11D0, [&hB1, &h88, &h00, &hAA, &h00, &h38, &hC9, &h69]] As IID

Interface IMLangCodePages
	Inherits IUnknown

	/* [helpstring] */ Function GetCharCodePages(
		/* [in] */ chSrc As WCHAR,
		/* [out] */ ByRef dwCodePages As DWord) As HRESULT
	/* [helpstring] */ Function GetStrCodePages(
		/* [size_is][in] */ pszSrc As PCWSTR,
		/* [in] */ cchSrc As Long,
		/* [in] */ dwPriorityCodePages As DWord,
		/* [out] */ ByRef dwCodePages As DWord,
		/* [out] */ ByRef cchCodePages As Long) As HRESULT
	/* [helpstring] */ Function CodePageToCodePages(
		/* [in] */ uCodePage As DWord,
		/* [out] */ ByRef dwCodePages As DWord) As HRESULT
	/* [helpstring] */ Function CodePagesToCodePage(
		/* [in] */ dwCodePages As DWord,
		/* [in] */ uDefaultCodePage As DWord,
		/* [out] */ ByRef uCodePage As DWord) As HRESULT
End Interface

/* interface IMLangFontLink */
/* [object][unique][helpstring][uuid] */

Dim IID_IMLangFontLink = [&h359F3441, &hBD4A, &h11D0, [&hB1, &h88, &h00, &hAA, &h00, &h38, &hC9, &h69]] As IID

Interface IMLangFontLink
	Inherits IMLangCodePages

	/* [helpstring] */ Function GetFontCodePages(
		/* [in] */ hDC As HDC,
		/* [in] */ hFont As HFONT,
		/* [out] */ ByRef dwCodePages As DWord) As HRESULT
	/* [helpstring] */ Function MapFont(
		/* [in] */ hDC As HDC,
		/* [in] */ dwCodePages As DWord,
		/* [in] */ hSrcFont As HFONT,
		/* [out] */ ByRef hDestFont As HFONT) As HRESULT
	/* [helpstring] */ Function ReleaseFont(
		/* [in] */ hFont As HFONT) As HRESULT
	/* [helpstring] */ Function ResetFontMapping() As HRESULT
End Interface

/* interface IMLangFontLink2 */
/* [object][unique][helpstring][uuid] */

Type UNICODERANGE
	wcFrom As WCHAR
	wcTo As WCHAR
End Type

Dim IID_IMLangFontLink2 = [&hDCCFC162, &h2B38, &h11d2, [&hB7, &hEC, &h00, &hC0, &h4F, &h8F, &h5D, &h9A]] As IID

Interface IMLangFontLink2
	Inherits IMLangCodePages

	/* [helpstring] */ Function GetFontCodePages(
		/* [in] */ hDC As HDC,
		/* [in] */ hFont As HFONT,
		/* [out] */ ByRef dwCodePages As DWord) As HRESULT
	/* [helpstring] */ Function ReleaseFont(
		/* [in] */ hFont As HFONT) As HRESULT
	/* [helpstring] */ Function ResetFontMapping() As HRESULT
	/* [helpstring] */ Function MapFont(
		/* [in] */ hDC As HDC,
		/* [in] */ dwCodePages As DWord,
		/* [in] */ chSrc As WCHAR,
		/* [out] */ ByRef hDestFont As HFONT) As HRESULT
	/* [helpstring] */ Function GetFontUnicodeRanges(
		/* [in] */ hDC As HDC,
		/* [out][in] */ ByRef uiRanges As DWord,
		/* [out] */ pUranges As *UNICODERANGE) As HRESULT
	/* [helpstring] */ Function GetScriptFontInfo(
		/* [in] */ sid As SCRIPT_ID,
		/* [in] */ dwFlags As DWord,
		/* [out][in] */ ByRef uiFonts As DWord,
		/* [out] */ pScriptFont As *SCRIPTFONTINFO) As HRESULT
	/* [helpstring] */ Function CodePageToScriptID(
		/* [in] */ uiCodePage As DWord,
		/* [out] */ ByRef Sid As SCRIPT_ID) As HRESULT
End Interface

/* interface IMultiLanguage3 */
/* [unique][uuid][object] */

Dim IID_IMultiLanguage3 = [&h4e5868ab, &hb157, &h4623, [&h9a, &hcc, &h6a, &h1d, &h9c, &hae, &hbe, &h04]] As IID

Interface IMultiLanguage3
	Inherits IMultiLanguage2

	Function DetectOutboundCodePage(
		/* [in] */ dwFlags As DWord,
		/* [in] */ lpWideCharStr As LPCWSTR,
		/* [in] */ cchWideChar As DWord,
		/* [in] */ puiPreferredCodePages As *DWord,
		/* [in] */ nPreferredCodePages As DWord,
		/* [in] */ puiDetectedCodePages As *DWord,
		/* [out][in] */ ByRef nDetectedCodePages As DWord,
		/* [in] */ lpSpecialChar As *WCHAR) As HRESULT
	Function DetectOutboundCodePageInIStream(
		/* [in] */ dwFlags As DWord,
		/* [in] */ StrIn As IStream,
		/* [in] */ puiPreferredCodePages As *DWord,
		/* [in] */ nPreferredCodePages As DWord,
		/* [in] */ puiDetectedCodePages As *DWord,
		/* [out][in] */ ByRef nDetectedCodePages As DWord,
		/* [in] */ lpSpecialChar As *WCHAR) As HRESULT
End Interface

Dim CLSID_CMultiLanguage = [&h275c23e2, &h3747, &h11d0, [&h9f, &hea, &h00, &haa, &h00, &h3f, &h86, &h46]] As CLSID
/*
Declare Function LcidToRfc1766A Lib "mlang" (Locale As LCID, pszRfc1766 As LPSTR, iMaxLength As Long) As HRESULT
Declare Function LcidToRfc1766W Lib "mlang" (Locale As LCID, pszRfc1766 As LPWSTR, nChar As Long) As HRESULT
#ifdef UNICODE
Declare Function LcidToRfc1766 Lib "mlang" Alias "LcidToRfc1766W" (Locale As LCID, pszRfc1766 As LPWSTR, nChar As Long) As HRESULT
#else
Declare Function LcidToRfc1766 Lib "mlang" Alias "LcidToRfc1766A" (Locale As LCID, pszRfc1766 As LPSTR, iMaxLength As Long) As HRESULT
#endif

Declare Function Rfc1766ToLcidA Lib "mlang" (ByRef Locale As LCID, pszRfc1766 As LPCSTR) As HRESULT
Declare Function Rfc1766ToLcidW Lib "mlang" (ByRef Locale As LCID, pszRfc1766 As LPCWSTR) As HRESULT
#ifdef UNICODE
Declare Function Rfc1766ToLcid Lib "mlang" Alias "Rfc1766ToLcidW" (ByRef Locale As LCID, pszRfc1766 As LPCWSTR) As HRESULT
#else
Declare Function Rfc1766ToLcid Lib "mlang" Alias "Rfc1766ToLcidA"(ByRef Locale As LCID, pszRfc1766 As LPCSTR) As HRESULT
#endif

Delcare Function IsConvertINetStringAvailable Lib "mlang" (dwSrcEncoding As DWord, dwDstEncoding As DWord) As HRESULT
Declare Function ConvertINetString Lib "mlang" (ByRef lpdwMode As DWord, dwSrcEncoding As DWord, dwDstEncoding As DWord, lpSrcStr As LPCSTR, lpnSrcSize As *Long, lpDstStr As LPSTR, lpnDstSize As *Long) As HRESULT
Declare Function ConvertINetMultiByteToUnicode Lib "mlang" (ByRef lpdwMode As DWord, dwEncoding As DWord, lpSrcStr As LPCSTR, lpnMultiCharCount As *Long, lpDstStr As LPWSTR, lpnWideCharCount As *Long) As HRESULT
Declare Function ConvertINetUnicodeToMultiByte Lib "mlang" (ByRef lpdwMode As DWord, dwEncoding As DWord, lpSrcStr As LPCWSTR, lpnWideCharCount As *Long, lpDstStr As LPSTR, lpnMultiCharCount As *Long) As HRESULT
*/
