' ########################################################################################
' Microsoft Windows
' File: MLang.inc
' Copyright (c) 2011 Jos? Roca
' Portions Copyright (c) Microsoft Corporation.
' All Rights Reserved.
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
' EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
' MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
' ########################################################################################
' ########################################################################################
' Library name: MultiLanguage
' Version: 0.2, Locale ID = 0
' Documentation string: MultiLanguage Object Model
' Library GUID: {275C23E0-3747-11D0-9FEA-00AA003F8646}
' ########################################################################################
#IF NOT %DEF(PBX_MLang_PBI)
#DEFINE PBX_MLang_PBI
%EQUATE `MLANG_INC = 1
#INCLUDE ONCE "Legacy/COM/Unknwn.inc"
#IF NOT %DEF(%MultiLanguage_LIBRARY_DEFINED)
%EQUATE `MultiLanguage_LIBRARY_DEFINED = 1
' ========================================================================================
' ClsIDs (Class identifiers)
' ========================================================================================
$CLSID_CMLangConvertCharset = GUID$("{D66D6F99-CDAA-11D0-B822-00C04FC9B31F}")
$CLSID_CMLangString = GUID$("{C04D65CF-B70D-11D0-B188-00AA0038C969}")
$CLSID_CMultiLanguage = GUID$("{275C23E2-3747-11D0-9FEA-00AA003F8646}")
' ========================================================================================
' IIDs (Interface identifiers)
' ========================================================================================
$IID_IEnumCodePage = GUID$("{275C23E3-3747-11D0-9FEA-00AA003F8646}")
$IID_IEnumRfc1766 = GUID$("{3DC39D1D-C030-11D0-B81B-00C04FC9B31F}")
$IID_IEnumScript = GUID$("{AE5F1430-388B-11D2-8380-00C04F8F5DA1}")
$IID_IMLangCodePages = GUID$("{359F3443-BD4A-11D0-B188-00AA0038C969}")
$IID_IMLangConvertCharset = GUID$("{D66D6F98-CDAA-11D0-B822-00C04FC9B31F}")
$IID_IMLangFontLink = GUID$("{359F3441-BD4A-11D0-B188-00AA0038C969}")
$IID_IMLangFontLink2 = GUID$("{DCCFC162-2B38-11D2-B7EC-00C04F8F5D9A}")
$IID_IMLangLineBreakConsole = GUID$("{F5BE2EE1-BFD7-11D0-B188-00AA0038C969}")
$IID_IMLangString = GUID$("{C04D65CE-B70D-11D0-B188-00AA0038C969}")
$IID_IMLangStringAStr = GUID$("{C04D65D2-B70D-11D0-B188-00AA0038C969}")
$IID_IMLangStringBufA = GUID$("{D24ACD23-BA72-11D0-B188-00AA0038C969}")
$IID_IMLangStringBufW = GUID$("{D24ACD21-BA72-11D0-B188-00AA0038C969}")
$IID_IMLangStringWStr = GUID$("{C04D65D0-B70D-11D0-B188-00AA0038C969}")
$IID_IMultiLanguage = GUID$("{275C23E1-3747-11D0-9FEA-00AA003F8646}")
$IID_IMultiLanguage2 = GUID$("{DCCFC164-2B38-11D2-B7EC-00C04F8F5D9A}")
$IID_IMultiLanguage3 = GUID$("{4E5868AB-B157-4623-9ACC-6A1D9CAEBE04}")
'typedef WORD LANGID;
' MLSTR_FLAGS enum
%EQUATE `MLSTR_READ = 1
%EQUATE `MLSTR_WRITE = 2
'// dwfIODControl definitions for ValidateCodePageEx()
%EQUATE `CPIOD_PEEK = &H40000000
%EQUATE `CPIOD_FORCE_PROMPT = &H80000000
' ########################################################################################
' Interface name = IMLangStringBufW
' IID = {D24ACD21-BA72-11D0-B188-00AA0038C969}
' Inherited interface = IUnknown
' Note: Not implemented.
' ########################################################################################
#IF NOT %DEF(%IMLangStringBufW_INTERFACE_DEFINED)
%EQUATE `IMLangStringBufW_INTERFACE_DEFINED = 1
INTERFACE IMLangStringBufW $IID_IMLangStringBufW
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetStatus ( ' VTable offset = 12
 BYREF plFlags AS LONG
 , BYREF pcchBuf AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD LockBuf ( ' VTable offset = 16
 BYVAL cchOffset AS LONG
 , BYVAL cchMaxLock AS LONG
 , BYREF ppszBuf AS DWORD
 , BYREF pcchBuf AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD UnlockBuf ( ' VTable offset = 20
 BYREF pszBuf AS WSTRINGZ
 , BYVAL cchOffset AS LONG
 , BYVAL cchWrite AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD Insert ( ' VTable offset = 24
 BYVAL cchOffset AS LONG
 , BYVAL cchMaxInsert AS LONG
 , BYREF pcchActual AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD Delete ( ' VTable offset = 28
 BYVAL cchOffset AS LONG
 , BYVAL cchDelete AS LONG
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMLangStringBufW_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMLangStringBufA
' IID = {D24ACD23-BA72-11D0-B188-00AA0038C969}
' Inherited interface = IUnknown
' Note: Not implemented.
' ########################################################################################
#IF NOT %DEF(%IMLangStringBufA_INTERFACE_DEFINED)
%EQUATE `IMLangStringBufA_INTERFACE_DEFINED = 1
INTERFACE IMLangStringBufA $IID_IMLangStringBufA
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetStatus ( ' VTable offset = 12
 BYREF plFlags AS LONG
 , BYREF pcchBuf AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD LockBuf ( ' VTable offset = 16
 BYVAL cchOffset AS LONG
 , BYVAL cchMaxLock AS LONG
 , BYREF ppszBuf AS DWORD
 , BYREF pcchBuf AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD UnlockBuf ( ' VTable offset = 20
 BYREF pszBuf AS ASCIIZ
 , BYVAL cchOffset AS LONG
 , BYVAL cchWrite AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD Insert ( ' VTable offset = 24
 BYVAL cchOffset AS LONG
 , BYVAL cchMaxInsert AS LONG
 , BYREF pcchActua AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD Delete ( ' VTable offset = 28
 BYVAL cchOffset AS LONG
 , BYVAL cchDelete AS LONG
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMLangStringBufA_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMLangString
' IID = {C04D65CE-B70D-11D0-B188-00AA0038C969}
' Inherited interface = IUnknown
' Note: Not implemented.
' ########################################################################################
#IF NOT %DEF(%IMLangString_INTERFACE_DEFINED)
%EQUATE `IMLangString_INTERFACE_DEFINED = 1
INTERFACE IMLangString $IID_IMLangString
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Sync ( ' VTable offset = 12
 BYVAL fNoAccess AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetLength ( ' VTable offset = 16
 BYREF plLen AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetMLStr ( ' VTable offset = 20
 BYVAL lDestPos AS LONG
 , BYVAL lDestLen AS LONG
 , BYVAL pSrcMLStr AS IUnknown
 , BYVAL lSrcPos AS LONG
 , BYVAL lSrcLen AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetMLStr ( ' VTable offset = 24
 BYVAL lSrcPos AS LONG
 , BYVAL lSrcLen AS LONG
 , BYVAL pUnkOuter AS IUnknown
 , BYVAL dwClsContext AS DWORD
 , BYREF piid AS GUID
 , BYREF ppDestMLStr AS IUnknown
 , BYREF plDestPos AS LONG
 , BYREF plDestLen AS LONG
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMLangString_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMLangStringWStr
' IID = {C04D65D0-B70D-11D0-B188-00AA0038C969}
' Inherited interface = IMLangString
' Note: Not implemented.
' ########################################################################################
#IF NOT %DEF(%IMLangStringWStr_INTERFACE_DEFINED)
%EQUATE `IMLangStringWStr_INTERFACE_DEFINED = 1
INTERFACE IMLangStringWStr $IID_IMLangStringWStr
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Sync ( ' VTable offset = 12
 BYVAL fNoAccess AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetLength ( ' VTable offset = 16
 BYREF plLen AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetMLStr ( ' VTable offset = 20
 BYVAL lDestPos AS LONG
 , BYVAL lDestLen AS LONG
 , BYVAL pSrcMLStr AS IUnknown
 , BYVAL lSrcPos AS LONG
 , BYVAL lSrcLen AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetMLStr ( ' VTable offset = 24
 BYVAL lSrcPos AS LONG
 , BYVAL lSrcLen AS LONG
 , BYVAL pUnkOuter AS IUnknown
 , BYVAL dwClsContext AS DWORD
 , BYREF piid AS GUID
 , BYREF ppDestMLStr AS IUnknown
 , BYREF plDestPos AS LONG
 , BYREF plDestLen AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetWStr ( ' VTable offset = 28
 BYVAL lDestPos AS LONG
 , BYVAL lDestLen AS LONG
 , BYREF pszSrc AS WSTRINGZ
 , BYVAL cchSrc AS LONG
 , BYREF pcchActual AS LONG
 , BYREF plActualLen AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetStrBufW ( ' VTable offset = 32
 BYVAL lDestPos AS LONG
 , BYVAL lDestLen AS LONG
 , BYVAL pSrcBuf AS IMLangStringBufW
 , BYREF pcchActual AS LONG
 , BYREF plActualLen AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetWStr ( ' VTable offset = 36
 BYVAL lSrcPos AS LONG
 , BYVAL lSrcLen AS LONG
 , BYREF pszDest AS WSTRINGZ
 , BYVAL cchDest AS LONG
 , BYREF pcchActual AS LONG
 , BYREF plActualLen AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetStrBufW ( ' VTable offset = 40
 BYVAL lSrcPos AS LONG
 , BYVAL lSrcMaxLen AS LONG
 , BYREF ppDestBuf AS IMLangStringBufW
 , BYREF plDestLen AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD LockWStr ( ' VTable offset = 44
 BYVAL lSrcPos AS LONG
 , BYVAL lSrcLen AS LONG
 , BYVAL lFlags AS LONG
 , BYVAL cchRequest AS LONG
 , BYREF ppszDest AS DWORD
 , BYREF pcchDest AS LONG
 , BYREF plDestLen AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD UnlockWStr ( ' VTable offset = 48
 BYREF pszSrc AS WSTRINGZ
 , BYVAL cchSrc AS LONG
 , BYREF pcchActual AS LONG
 , BYREF plActualLen AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetLocale ( ' VTable offset = 52
 BYVAL lDestPos AS LONG
 , BYVAL lDestLen AS LONG
 , BYVAL locale AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetLocale ( ' VTable offset = 56
 BYVAL lSrcPos AS LONG
 , BYVAL lSrcMaxLen AS LONG
 , BYREF plocale AS DWORD
 , BYREF plLocalePos AS LONG
 , BYREF plLocaleLen AS LONG
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMLangStringWStr_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMLangStringAStr
' IID = {C04D65D2-B70D-11D0-B188-00AA0038C969}
' Inherited interface = IMLangString
' Note: Not implemented.
' ########################################################################################
#IF NOT %DEF(%IMLangStringAStr_INTERFACE_DEFINED)
%EQUATE `IMLangStringAStr_INTERFACE_DEFINED = 1
INTERFACE IMLangStringAStr $IID_IMLangStringAStr
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Sync ( ' VTable offset = 12
 BYVAL fNoAccess AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetLength ( ' VTable offset = 16
 BYREF plLen AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetMLStr ( ' VTable offset = 20
 BYVAL lDestPos AS LONG
 , BYVAL lDestLen AS LONG
 , BYVAL pSrcMLStr AS IUnknown
 , BYVAL lSrcPos AS LONG
 , BYVAL lSrcLen AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetMLStr ( ' VTable offset = 24
 BYVAL lSrcPos AS LONG
 , BYVAL lSrcLen AS LONG
 , BYVAL pUnkOuter AS IUnknown
 , BYVAL dwClsContext AS DWORD
 , BYREF piid AS GUID
 , BYREF ppDestMLStr AS IUnknown
 , BYREF plDestPos AS LONG
 , BYREF plDestLen AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetAStr ( ' VTable offset = 28
 BYVAL lDestPos AS LONG
 , BYVAL lDestLen AS LONG
 , BYVAL uCodePage AS DWORD
 , BYREF pszSrc AS ASCIIZ
 , BYVAL cchSrc AS LONG
 , BYREF pcchActual AS LONG
 , BYREF plActualLen AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetStrBufA ( ' VTable offset = 32
 BYVAL lDestPos AS LONG
 , BYVAL lDestLen AS LONG
 , BYVAL uCodePage AS DWORD
 , BYVAL pSrcBuf AS IMLangStringBufA
 , BYREF pcchActual AS LONG
 , BYREF plActualLen AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetAStr ( ' VTable offset = 36
 BYVAL lSrcPos AS LONG
 , BYVAL lSrcLen AS LONG
 , BYVAL uCodePageIn AS DWORD
 , BYREF puCodePageOut AS DWORD
 , BYREF pszDest AS ASCIIZ
 , BYVAL cchDest AS LONG
 , BYREF pcchActual AS LONG
 , BYREF plActualLen AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetStrBufA ( ' VTable offset = 40
 BYVAL lSrcPos AS LONG
 , BYVAL lSrcMaxLen AS LONG
 , BYREF puDestCodePage AS DWORD
 , BYREF ppDestBuf AS IMLangStringBufA
 , BYREF plDestLen AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD LockAStr ( ' VTable offset = 44
 BYVAL lSrcPos AS LONG
 , BYVAL lSrcLen AS LONG
 , BYVAL lFlags AS LONG
 , BYVAL uCodePageIn AS DWORD
 , BYVAL cchRequest AS LONG
 , BYREF puCodePageOut AS DWORD
 , BYREF ppszDest AS DWORD
 , BYREF pcchDest AS LONG
 , BYREF plDestLen AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD UnlockAStr ( ' VTable offset = 48
 BYREF pszSrc AS ASCIIZ
 , BYVAL cchSrc AS LONG
 , BYREF pcchActual AS LONG
 , BYREF plActualLen AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetLocale ( ' VTable offset = 52
 BYVAL lDestPos AS LONG
 , BYVAL lDestLen AS LONG
 , BYVAL locale AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetLocale ( ' VTable offset = 56
 BYVAL lSrcPos AS LONG
 , BYVAL lSrcMaxLen AS LONG
 , BYREF plocale AS DWORD
 , BYREF plLocalePos AS LONG
 , BYREF plLocaleLen AS LONG
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMLangStringAStr_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMLangLineBreakConsole
' IID = {F5BE2EE1-BFD7-11D0-B188-00AA0038C969}
' IMLangLineBreakConsole Interface
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMLangLineBreakConsole_INTERFACE_DEFINED)
%EQUATE `IMLangLineBreakConsole_INTERFACE_DEFINED = 1
INTERFACE IMLangLineBreakConsole $IID_IMLangLineBreakConsole
 INHERIT IUnknown
 ' =====================================================================================
 METHOD BreakLineML ( ' VTable offset = 12
 BYVAL pSrcMLStr AS IMLangString
 , BYVAL lSrcPos AS LONG
 , BYVAL lSrcLen AS LONG
 , BYVAL cMinColumns AS LONG
 , BYVAL cMaxColumns AS LONG
 , BYREF plLineLen AS LONG
 , BYREF plSkipLen AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD BreakLineW ( ' VTable offset = 16
 BYVAL locale AS DWORD
 , BYREF pszSrc AS WSTRINGZ
 , BYVAL cchSrc AS LONG
 , BYVAL cMaxColumns AS LONG
 , BYREF pcchLine AS LONG
 , BYREF pcchSkip AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD BreakLineA ( ' VTable offset = 20
 BYVAL locale AS DWORD
 , BYVAL uCodePage AS DWORD
 , BYREF pszSrc AS ASCIIZ
 , BYVAL cchSrc AS LONG
 , BYVAL cMaxColumns AS LONG
 , BYREF pcchLine AS LONG
 , BYREF pcchSkip AS LONG
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMLangLineBreakConsole_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IEnumCodePage
' IID = {275C23E3-3747-11D0-9FEA-00AA003F8646}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IEnumCodePage_INTERFACE_DEFINED)
%EQUATE `IEnumCodePage_INTERFACE_DEFINED = 1
%EQUATE `MAX_MIMECP_NAME = 64
%EQUATE `MAX_MIMECSET_NAME = 50
%EQUATE `MAX_MIMEFACE_NAME = 32
' MIMECONTF enum
%EQUATE `MIMECONTF_MAILNEWS = &H1
%EQUATE `MIMECONTF_BROWSER = &H2
%EQUATE `MIMECONTF_MINIMAL = &H4
%EQUATE `MIMECONTF_IMPORT = &H8
%EQUATE `MIMECONTF_SAVABLE_MAILNEWS = &H100
%EQUATE `MIMECONTF_SAVABLE_BROWSER = &H200
%EQUATE `MIMECONTF_EXPORT = &H400
%EQUATE `MIMECONTF_PRIVCONVERTER = &H10000
%EQUATE `MIMECONTF_VALID = &H20000
%EQUATE `MIMECONTF_VALID_NLS = &H40000
%EQUATE `MIMECONTF_MIME_IE4 = &H10000000
%EQUATE `MIMECONTF_MIME_LATEST = &H20000000
%EQUATE `MIMECONTF_MIME_REGISTRY = &H40000000
' // Size = 572 bytes
TYPE MIMECPINFO DWORD
 dwFlags AS DWORD
 uiCodePage AS DWORD ' UINT
 uiFamilyCodePage AS DWORD ' UINT
 wszDescription AS WSTRINGZ * 64 ' WCHAR
 wszWebCharset AS WSTRINGZ * 50 ' WCHAR
 wszHeaderCharset AS WSTRINGZ * 50 ' WCHAR
 wszBodyCharset AS WSTRINGZ * 50 ' WCHAR
 wszFixedWidthFont AS WSTRINGZ * 32 ' WCHAR
 wszProportionalFont AS WSTRINGZ * 32 ' WCHAR
 bGDICharset AS BYTE ' BYTE
END TYPE
' // Size = 108 bytes
TYPE MIMECSETINFO DWORD
 uiCodePage AS DWORD ' UINT
 uiInternetEncoding AS DWORD ' UINT
 wszCharset AS WSTRINGZ * 50 ' WCHAR
END TYPE
INTERFACE IEnumCodePage $IID_IEnumCodePage
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Clone ( ' VTable offset = 12
 BYREF ppEnum AS IEnumCodePage
 ) AS LONG
 ' =====================================================================================
 METHOD Next ( ' VTable offset = 16
 BYVAL celt AS DWORD
 , BYREF rgelt AS MIMECPINFO
 , BYREF pceltFetched AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Reset ( ' VTable offset = 20
 ) AS LONG
 ' =====================================================================================
 METHOD Skip ( ' VTable offset = 24
 BYVAL celt AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IEnumCodePage_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IEnumRfc1766
' IID = {3DC39D1D-C030-11D0-B81B-00C04FC9B31F}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IEnumRfc1766_INTERFACE_DEFINED)
%EQUATE `IEnumRfc1766_INTERFACE_DEFINED = 1
%EQUATE `MAX_RFC1766_NAME = 6
%EQUATE `MAX_LOCALE_NAME = 32
' // Size = 80 bytes
TYPE RFC1766INFO DWORD
 lcid AS DWORD ' LCID
 wszRfc1766 AS WSTRINGZ * 6 ' WCHAR
 wszLocaleName AS WSTRINGZ * 32 ' WCHAR
END TYPE
INTERFACE IEnumRfc1766 $IID_IEnumRfc1766
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Clone ( ' VTable offset = 12
 BYREF ppEnum AS IEnumRfc1766
 ) AS LONG
 ' =====================================================================================
 METHOD Next ( ' VTable offset = 16
 BYVAL celt AS DWORD
 , BYREF rgelt AS RFC1766INFO
 , BYREF pceltFetched AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Reset ( ' VTable offset = 20
 ) AS LONG
 ' =====================================================================================
 METHOD Skip ( ' VTable offset = 24
 BYVAL celt AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IEnumRfc1766_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IEnumScript
' IID = {AE5F1430-388B-11D2-8380-00C04F8F5DA1}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IEnumScript_INTERFACE_DEFINED)
%EQUATE `IEnumScript_INTERFACE_DEFINED = 1
%EQUATE `MAX_SCRIPT_NAME = 48
'typedef BYTE SCRIPT_ID;
'typedef __int64 SCRIPT_IDS;
' SCRIPTCONTF enum
%EQUATE `sidDefault = 0
%EQUATE `sidMerge = %sidDefault + 1
%EQUATE `sidAsciiSym = %sidMerge + 1
%EQUATE `sidAsciiLatin = %sidAsciiSym + 1
%EQUATE `sidLatin = %sidAsciiLatin + 1
%EQUATE `sidGreek = %sidLatin + 1
%EQUATE `sidCyrillic = %sidGreek + 1
%EQUATE `sidArmenian = %sidCyrillic + 1
%EQUATE `sidHebrew = %sidArmenian + 1
%EQUATE `sidArabic = %sidHebrew + 1
%EQUATE `sidDevanagari = %sidArabic + 1
%EQUATE `sidBengali = %sidDevanagari + 1
%EQUATE `sidGurmukhi = %sidBengali + 1
%EQUATE `sidGujarati = %sidGurmukhi + 1
%EQUATE `sidOriya = %sidGujarati + 1
%EQUATE `sidTamil = %sidOriya + 1
%EQUATE `sidTelugu = %sidTamil + 1
%EQUATE `sidKannada = %sidTelugu + 1
%EQUATE `sidMalayalam = %sidKannada + 1
%EQUATE `sidThai = %sidMalayalam + 1
%EQUATE `sidLao = %sidThai + 1
%EQUATE `sidTibetan = %sidLao + 1
%EQUATE `sidGeorgian = %sidTibetan + 1
%EQUATE `sidHangul = %sidGeorgian + 1
%EQUATE `sidKana = %sidHangul + 1
%EQUATE `sidBopomofo = %sidKana + 1
%EQUATE `sidHan = %sidBopomofo + 1
%EQUATE `sidEthiopic = %sidHan + 1
%EQUATE `sidCanSyllabic = %sidEthiopic + 1
%EQUATE `sidCherokee = %sidCanSyllabic + 1
%EQUATE `sidYi = %sidCherokee + 1
%EQUATE `sidBraille = %sidYi + 1
%EQUATE `sidRunic = %sidBraille + 1
%EQUATE `sidOgham = %sidRunic + 1
%EQUATE `sidSinhala = %sidOgham + 1
%EQUATE `sidSyriac = %sidSinhala + 1
%EQUATE `sidBurmese = %sidSyriac + 1
%EQUATE `sidKhmer = %sidBurmese + 1
%EQUATE `sidThaana = %sidKhmer + 1
%EQUATE `sidMongolian = %sidThaana + 1
%EQUATE `sidUserDefined = %sidMongolian + 1
%EQUATE `sidLim = %sidUserDefined + 1
%EQUATE `sidFEFirst = %sidHangul
%EQUATE `sidFELast = %sidHan
' // Size = 232 bytes
TYPE SCRIPTINFO DWORD
 ScriptId AS BYTE ' SCRIPT_ID
 uiCodePage AS DWORD ' UINT
 wszDescription AS WSTRINGZ * 48 ' WCHAR
 wszFixedWidthFont AS WSTRINGZ * 32 ' WCHAR
 wszProportionalFont AS WSTRINGZ * 32 ' WCHAR
END TYPE
INTERFACE IEnumScript $IID_IEnumScript
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Clone ( ' VTable offset = 12
 BYREF ppEnum AS IEnumScript
 ) AS LONG
 ' =====================================================================================
 METHOD Next ( ' VTable offset = 16
 BYVAL celt AS DWORD
 , BYREF rgelt AS SCRIPTINFO
 , BYREF pceltFetched AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Reset ( ' VTable offset = 20
 ) AS LONG
 ' =====================================================================================
 METHOD Skip ( ' VTable offset = 24
 BYVAL celt AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IEnumScript_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMLangConvertCharset
' IID = {D66D6F98-CDAA-11D0-B822-00C04FC9B31F}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMLangConvertCharset_INTERFACE_DEFINED)
%EQUATE `IMLangConvertCharset_INTERFACE_DEFINED = 1
' MLCONVCHAR enum
%EQUATE `MLCONVCHARF_AUTODETECT = 1
%EQUATE `MLCONVCHARF_ENTITIZE = 2
%EQUATE `MLCONVCHARF_NCR_ENTITIZE = 2
%EQUATE `MLCONVCHARF_NAME_ENTITIZE = 4
%EQUATE `MLCONVCHARF_USEDEFCHAR = 8
%EQUATE `MLCONVCHARF_NOBESTFITCHARS = 16
%EQUATE `MLCONVCHARF_DETECTJPN = 32
' MLCP enum
%EQUATE `MLDETECTF_MAILNEWS = &H1
%EQUATE `MLDETECTF_BROWSER = &H2
%EQUATE `MLDETECTF_VALID = &H4
%EQUATE `MLDETECTF_VALID_NLS = &H8
%EQUATE `MLDETECTF_PRESERVE_ORDER = &H10
%EQUATE `MLDETECTF_PREFERRED_ONLY = &H20
%EQUATE `MLDETECTF_FILTER_SPECIALCHAR = &H40
%EQUATE `MLDETECTF_EURO_UTF8 = &H80
INTERFACE IMLangConvertCharset $IID_IMLangConvertCharset
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Initialize ( ' VTable offset = 12
 BYVAL uiSrcCodePage AS DWORD
 , BYVAL uiDstCodePage AS DWORD
 , BYVAL dwProperty AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetSourceCodePage ( ' VTable offset = 16
 BYREF puiSrcCodePage AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetDestinationCodePage ( ' VTable offset = 20
 BYREF puiDstCodePage AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetProperty ( ' VTable offset = 24
 BYREF pdwProperty AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD DoConversion ( ' VTable offset = 28
 BYREF pSrcStr AS BYTE
 , BYREF pcSrcSize AS DWORD
 , BYREF pDstStr AS BYTE
 , BYREF pcDstSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD DoConversionToUnicode ( ' VTable offset = 32
 BYREF pSrcStr AS ASCIIZ
 , BYREF pcSrcSize AS DWORD
 , BYREF pDstStr AS WSTRINGZ
 , BYREF pcDstSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD DoConversionFromUnicode ( ' VTable offset = 36
 BYREF pSrcStr AS WSTRINGZ
 , BYREF pcSrcSize AS DWORD
 , BYREF pDstStr AS ASCIIZ
 , BYREF pcDstSize AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMLangConvertCharset_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMultiLanguage
' IID = {275C23E1-3747-11D0-9FEA-00AA003F8646}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMultiLanguage_INTERFACE_DEFINED)
%EQUATE `IMultiLanguage_INTERFACE_DEFINED = 1
INTERFACE IMultiLanguage $IID_IMultiLanguage
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetNumberOfCodePageInfo ( ' VTable offset = 12
 BYREF pcCodePage AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetCodePageInfo ( ' VTable offset = 16
 BYVAL uiCodePage AS DWORD
 , BYREF pCodePageInfo AS MIMECPINFO
 ) AS LONG
 ' =====================================================================================
 METHOD GetFamilyCodePage ( ' VTable offset = 20
 BYVAL uiCodePage AS DWORD
 , BYREF puiFamilyCodePage AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD EnumCodePages ( ' VTable offset = 24
 BYVAL grfFlags AS DWORD
 , BYREF ppEnumCodePage AS IEnumCodePage
 ) AS LONG
 ' =====================================================================================
 METHOD GetCharsetInfo ( ' VTable offset = 28
 BYVAL Charset AS WSTRING
 , BYREF pCharsetInfo AS MIMECSETINFO
 ) AS LONG
 ' =====================================================================================
 METHOD IsConvertible ( ' VTable offset = 32
 BYVAL dwSrcEncoding AS DWORD
 , BYVAL dwDstEncoding AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD ConvertString ( ' VTable offset = 36
 BYREF pdwMode AS DWORD
 , BYVAL dwSrcEncoding AS DWORD
 , BYVAL dwDstEncoding AS DWORD
 , BYREF pSrcStr AS BYTE
 , BYREF pcSrcSize AS DWORD
 , BYREF pDstStr AS BYTE
 , BYREF pcDstSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD ConvertStringToUnicode ( ' VTable offset = 40
 BYREF pdwMode AS DWORD
 , BYVAL dwEncoding AS DWORD
 , BYREF pSrcStr AS ASCIIZ
 , BYREF pcSrcSize AS DWORD
 , BYREF pDstStr AS WSTRINGZ
 , BYREF pcDstSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD ConvertStringFromUnicode ( ' VTable offset = 44
 BYREF pdwMode AS DWORD
 , BYVAL dwEncoding AS DWORD
 , BYREF pSrcStr AS WSTRINGZ
 , BYREF pcSrcSize AS DWORD
 , BYREF pDstStr AS ASCIIZ
 , BYREF pcDstSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD ConvertStringReset ( ' VTable offset = 48
 ) AS LONG
 ' =====================================================================================
 METHOD GetRfc1766FromLcid ( ' VTable offset = 52
 BYVAL Locale AS DWORD
 , BYREF pbstrRfc1766 AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD GetLcidFromRfc1766 ( ' VTable offset = 56
 BYREF pLocale AS DWORD
 , BYVAL bstrRfc1766 AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD EnumRfc1766 ( ' VTable offset = 60
 BYREF ppEnumRfc1766 AS IEnumRfc1766
 ) AS LONG
 ' =====================================================================================
 METHOD GetRfc1766Info ( ' VTable offset = 64
 BYVAL Locale AS DWORD
 , BYREF pRfc1766Info AS RFC1766INFO
 ) AS LONG
 ' =====================================================================================
 METHOD CreateConvertCharset ( ' VTable offset = 68
 BYVAL uiSrcCodePage AS DWORD
 , BYVAL uiDstCodePage AS DWORD
 , BYVAL dwProperty AS DWORD
 , BYREF ppMLangConvertCharset AS IMLangConvertCharset
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMultiLanguage_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMultiLanguage2
' IID = {DCCFC164-2B38-11D2-B7EC-00C04F8F5D9A}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMultiLanguage2_INTERFACE_DEFINED)
%EQUATE `IMultiLanguage2_INTERFACE_DEFINED = 1
' MLDETECTCP enum
%EQUATE `MLDETECTCP_NONE = 0
%EQUATE `MLDETECTCP_7BIT = 1
%EQUATE `MLDETECTCP_8BIT = 2
%EQUATE `MLDETECTCP_DBCS = 4
%EQUATE `MLDETECTCP_HTML = 8
%EQUATE `MLDETECTCP_NUMBER = 16
' // Size = 16 bytes
TYPE DetectEncodingInfo DWORD
 nLangID AS DWORD ' UINT
 nCodePage AS DWORD ' UINT
 nDocPercent AS LONG ' INT
 nConfidence AS LONG ' INT
END TYPE
' SCRIPTFONTCONTF enum
%EQUATE `SCRIPTCONTF_FIXED_FONT = &H1
%EQUATE `SCRIPTCONTF_PROPORTIONAL_FONT = &H2
%EQUATE `SCRIPTCONTF_SCRIPT_USER = &H10000
%EQUATE `SCRIPTCONTF_SCRIPT_HIDE = &H20000
%EQUATE `SCRIPTCONTF_SCRIPT_SYSTEM = &H40000
' // Size = 72 bytes
TYPE SCRIPTFONTINFO QWORD
 scripts AS QUAD ' SCRIPT_IDS
 wszFont AS WSTRINGZ * 32 ' WCHAR
END TYPE
INTERFACE IMultiLanguage2 $IID_IMultiLanguage2
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetNumberOfCodePageInfo ( ' VTable offset = 12
 BYREF pcCodePage AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetCodePageInfo ( ' VTable offset = 16
 BYVAL uiCodePage AS DWORD
 , BYVAL LangId AS WORD
 , BYREF pCodePageInfo AS MIMECPINFO
 ) AS LONG
 ' =====================================================================================
 METHOD GetFamilyCodePage ( ' VTable offset = 20
 BYVAL uiCodePage AS DWORD
 , BYREF puiFamilyCodePage AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD EnumCodePages ( ' VTable offset = 24
 BYVAL grfFlags AS DWORD
 , BYVAL LangId AS WORD
 , BYREF ppEnumCodePage AS IEnumCodePage
 ) AS LONG
 ' =====================================================================================
 METHOD GetCharsetInfo ( ' VTable offset = 28
 BYVAL Charset AS WSTRING
 , BYREF pCharsetInfo AS MIMECSETINFO
 ) AS LONG
 ' =====================================================================================
 METHOD IsConvertible ( ' VTable offset = 32
 BYVAL dwSrcEncoding AS DWORD
 , BYVAL dwDstEncoding AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD ConvertString ( ' VTable offset = 36
 BYREF pdwMode AS DWORD
 , BYVAL dwSrcEncoding AS DWORD
 , BYVAL dwDstEncoding AS DWORD
 , BYREF pSrcStr AS BYTE
 , BYREF pcSrcSize AS DWORD
 , BYREF pDstStr AS BYTE
 , BYREF pcDstSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD ConvertStringToUnicode ( ' VTable offset = 40
 BYREF pdwMode AS DWORD
 , BYVAL dwEncoding AS DWORD
 , BYREF pSrcStr AS ASCIIZ
 , BYREF pcSrcSize AS DWORD
 , BYREF pDstStr AS WSTRINGZ
 , BYREF pcDstSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD ConvertStringFromUnicode ( ' VTable offset = 44
 BYREF pdwMode AS DWORD
 , BYVAL dwEncoding AS DWORD
 , BYREF pSrcStr AS WSTRINGZ
 , BYREF pcSrcSize AS DWORD
 , BYREF pDstStr AS ASCIIZ
 , BYREF pcDstSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD ConvertStringReset ( ' VTable offset = 48
 ) AS LONG
 ' =====================================================================================
 METHOD GetRfc1766FromLcid ( ' VTable offset = 52
 BYVAL Locale AS DWORD
 , BYREF pbstrRfc1766 AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD GetLcidFromRfc1766 ( ' VTable offset = 56
 BYREF pLocale AS DWORD
 , BYVAL bstrRfc1766 AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD EnumRfc1766 ( ' VTable offset = 60
 BYVAL LangId AS WORD
 , BYREF ppEnumRfc1766 AS IEnumRfc1766
 ) AS LONG
 ' =====================================================================================
 METHOD GetRfc1766Info ( ' VTable offset = 64
 BYVAL Locale AS DWORD
 , BYVAL LangId AS WORD
 , BYREF pRfc1766Info AS RFC1766INFO
 ) AS LONG
 ' =====================================================================================
 METHOD CreateConvertCharset ( ' VTable offset = 68
 BYVAL uiSrcCodePage AS DWORD
 , BYVAL uiDstCodePage AS DWORD
 , BYVAL dwProperty AS DWORD
 , BYREF ppMLangConvertCharset AS IMLangConvertCharset
 ) AS LONG
 ' =====================================================================================
 METHOD ConvertStringInIStream ( ' VTable offset = 72
 BYREF pdwMode AS DWORD
 , BYVAL dwFlag AS DWORD
 , BYREF lpFallBack AS WSTRINGZ
 , BYVAL dwSrcEncoding AS DWORD
 , BYVAL dwDstEncoding AS DWORD
 , BYVAL pstmIn AS IStream
 , BYVAL pstmOut AS IStream
 ) AS LONG
 ' =====================================================================================
 METHOD ConvertStringToUnicodeEx ( ' VTable offset = 76
 BYREF pdwMode AS DWORD
 , BYVAL dwEncoding AS DWORD
 , BYREF pSrcStr AS ASCIIZ
 , BYREF pcSrcSize AS DWORD
 , BYREF pDstStr AS WSTRINGZ
 , BYREF pcDstSize AS DWORD
 , BYVAL dwFlag AS DWORD
 , BYREF lpFallBack AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD ConvertStringFromUnicodeEx ( ' VTable offset = 80
 BYREF pdwMode AS DWORD
 , BYVAL dwEncoding AS DWORD
 , BYREF pSrcStr AS WSTRINGZ
 , BYREF pcSrcSize AS DWORD
 , BYREF pDstStr AS ASCIIZ
 , BYREF pcDstSize AS DWORD
 , BYVAL dwFlag AS DWORD
 , BYREF lpFallBack AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD DetectCodepageInIStream ( ' VTable offset = 84
 BYVAL dwFlag AS DWORD
 , BYVAL dwPrefWinCodePage AS DWORD
 , BYVAL pstmIn AS IStream
 , BYREF lpEncoding AS DetectEncodingInfo
 , BYREF pnScores AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD DetectInputCodepage ( ' VTable offset = 88
 BYVAL dwFlag AS DWORD
 , BYVAL dwPrefWinCodePage AS DWORD
 , BYREF pSrcStr AS ASCIIZ
 , BYREF pcSrcSize AS LONG
 , BYREF lpEncoding AS DetectEncodingInfo
 , BYREF pnScores AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD ValidateCodePage ( ' VTable offset = 92
 BYVAL uiCodePage AS DWORD
 , BYVAL hwnd AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetCodePageDescription ( ' VTable offset = 96
 BYVAL uiCodePage AS DWORD
 , BYVAL lcid AS DWORD
 , BYREF lpWideCharStr AS WSTRINGZ
 , BYVAL cchWideChar AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD IsCodePageInstallable ( ' VTable offset = 100
 BYVAL uiCodePage AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetMimeDBSource ( ' VTable offset = 104
 BYVAL dwSource AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetNumberOfScripts ( ' VTable offset = 108
 BYREF pnScripts AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD EnumScripts ( ' VTable offset = 112
 BYVAL dwFlags AS DWORD
 , BYVAL LangId AS WORD
 , BYREF ppEnumScript AS IEnumScript
 ) AS LONG
 ' =====================================================================================
 METHOD ValidateCodePageEx ( ' VTable offset = 116
 BYVAL uiCodePage AS DWORD
 , BYVAL hwnd AS DWORD
 , BYVAL dwfIODControl AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMultiLanguage2_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMLangCodePages
' IID = {359F3443-BD4A-11D0-B188-00AA0038C969}
' IMLangCodePages Interface
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMLangCodePages_INTERFACE_DEFINED)
%EQUATE `IMLangCodePages_INTERFACE_DEFINED = 1
INTERFACE IMLangCodePages $IID_IMLangCodePages
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetCharCodePages ( ' VTable offset = 12
 BYVAL chSrc AS WORD
 , BYREF pdwCodePages AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetStrCodePages ( ' VTable offset = 16
 BYREF pszSrc AS WSTRINGZ
 , BYVAL cchSrc AS LONG
 , BYVAL dwPriorityCodePages AS DWORD
 , BYREF pdwCodePages AS DWORD
 , BYREF pcchCodePages AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD CodePageToCodePages ( ' VTable offset = 20
 BYVAL uCodePage AS DWORD
 , BYREF pdwCodePages AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD CodePagesToCodePage ( ' VTable offset = 24
 BYVAL dwCodePages AS DWORD
 , BYVAL uDefaultCodePage AS DWORD
 , BYREF puCodePage AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMLangCodePages_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMLangFontLink
' IID = {359F3441-BD4A-11D0-B188-00AA0038C969}
' IMLangFontLink Interface
' Inherited interface = IMLangCodePages
' ########################################################################################
#IF NOT %DEF(%IMLangFontLink_INTERFACE_DEFINED)
%EQUATE `IMLangFontLink_INTERFACE_DEFINED = 1
INTERFACE IMLangFontLink $IID_IMLangFontLink
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetCharCodePages ( ' VTable offset = 12
 BYVAL chSrc AS WORD
 , BYREF pdwCodePages AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetStrCodePages ( ' VTable offset = 16
 BYREF pszSrc AS WSTRINGZ
 , BYVAL cchSrc AS LONG
 , BYVAL dwPriorityCodePages AS DWORD
 , BYREF pdwCodePages AS DWORD
 , BYREF pcchCodePages AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD CodePageToCodePages ( ' VTable offset = 20
 BYVAL uCodePage AS DWORD
 , BYREF pdwCodePages AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD CodePagesToCodePage ( ' VTable offset = 24
 BYVAL dwCodePages AS DWORD
 , BYVAL uDefaultCodePage AS DWORD
 , BYREF puCodePage AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetFontCodePages ( ' VTable offset = 28
 BYVAL hDC AS DWORD
 , BYVAL hFont AS DWORD
 , BYREF pdwCodePages AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD MapFont ( ' VTable offset = 32
 BYVAL hDC AS DWORD
 , BYVAL dwCodePages AS DWORD
 , BYVAL hSrcFont AS DWORD
 , BYREF phDestFont AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD ReleaseFont ( ' VTable offset = 36
 BYVAL hFont AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD ResetFontMapping ( ' VTable offset = 40
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMLangFontLink_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMLangFontLink2
' IID = {DCCFC162-2B38-11D2-B7EC-00C04F8F5D9A}
' Inherited interface = IMLangCodePages
' ########################################################################################
#IF NOT %DEF(%IMLangFontLink2_INTERFACE_DEFINED)
%EQUATE `IMLangFontLink2_INTERFACE_DEFINED = 1
' // Size = 4 bytes
TYPE UNICODERANGE WORD
 wcFrom AS WORD ' WCHAR
 wcTo AS WORD ' WCHAR
END TYPE
INTERFACE IMLangFontLink2 $IID_IMLangFontLink2
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetCharCodePages ( ' VTable offset = 12
 BYVAL chSrc AS WORD
 , BYREF pdwCodePages AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetStrCodePages ( ' VTable offset = 16
 BYREF pszSrc AS WSTRINGZ
 , BYVAL cchSrc AS LONG
 , BYVAL dwPriorityCodePages AS DWORD
 , BYREF pdwCodePages AS DWORD
 , BYREF pcchCodePages AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD CodePageToCodePages ( ' VTable offset = 20
 BYVAL uCodePage AS DWORD
 , BYREF pdwCodePages AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD CodePagesToCodePage ( ' VTable offset = 24
 BYVAL dwCodePages AS DWORD
 , BYVAL uDefaultCodePage AS DWORD
 , BYREF puCodePage AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetFontCodePages ( ' VTable offset = 28
 BYVAL hDC AS DWORD
 , BYVAL hFont AS DWORD
 , BYREF pdwCodePages AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD ReleaseFont ( ' VTable offset = 32
 BYVAL hFont AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD ResetFontMapping ( ' VTable offset = 36
 ) AS LONG
 ' =====================================================================================
 METHOD MapFont ( ' VTable offset = 40
 BYVAL hDC AS DWORD
 , BYVAL dwCodePages AS DWORD
 , BYVAL chSrc AS WORD
 , BYREF pFont AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetFontUnicodeRanges ( ' VTable offset = 44
 BYVAL hDC AS DWORD
 , BYREF puiRanges AS DWORD
 , BYREF pUranges AS UNICODERANGE
 ) AS LONG
 ' =====================================================================================
 METHOD GetScriptFontInfo ( ' VTable offset = 48
 BYVAL sid AS BYTE
 , BYVAL dwFlags AS DWORD
 , BYREF puiFonts AS DWORD
 , BYREF pScriptFont AS SCRIPTFONTINFO
 ) AS LONG
 ' =====================================================================================
 METHOD CodePageToScriptID ( ' VTable offset = 52
 BYVAL uiCodePage AS DWORD
 , BYREF pSid AS BYTE
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMLangFontLink2_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMultiLanguage3
' IID = {4E5868AB-B157-4623-9ACC-6A1D9CAEBE04}
' Inherited interface = IMultiLanguage2
' ########################################################################################
#IF NOT %DEF(%IMultiLanguage3_INTERFACE_DEFINED)
%EQUATE `IMultiLanguage3_INTERFACE_DEFINED = 1
INTERFACE IMultiLanguage3 $IID_IMultiLanguage3
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetNumberOfCodePageInfo ( ' VTable offset = 12
 BYREF pcCodePage AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetCodePageInfo ( ' VTable offset = 16
 BYVAL uiCodePage AS DWORD
 , BYVAL LangId AS WORD
 , BYREF pCodePageInfo AS MIMECPINFO
 ) AS LONG
 ' =====================================================================================
 METHOD GetFamilyCodePage ( ' VTable offset = 20
 BYVAL uiCodePage AS DWORD
 , BYREF puiFamilyCodePage AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD EnumCodePages ( ' VTable offset = 24
 BYVAL grfFlags AS DWORD
 , BYVAL LangId AS WORD
 , BYREF ppEnumCodePage AS IEnumCodePage
 ) AS LONG
 ' =====================================================================================
 METHOD GetCharsetInfo ( ' VTable offset = 28
 BYVAL Charset AS WSTRING
 , BYREF pCharsetInfo AS MIMECSETINFO
 ) AS LONG
 ' =====================================================================================
 METHOD IsConvertible ( ' VTable offset = 32
 BYVAL dwSrcEncoding AS DWORD
 , BYVAL dwDstEncoding AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD ConvertString ( ' VTable offset = 36
 BYREF pdwMode AS DWORD
 , BYVAL dwSrcEncoding AS DWORD
 , BYVAL dwDstEncoding AS DWORD
 , BYREF pSrcStr AS BYTE
 , BYREF pcSrcSize AS DWORD
 , BYREF pDstStr AS BYTE
 , BYREF pcDstSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD ConvertStringToUnicode ( ' VTable offset = 40
 BYREF pdwMode AS DWORD
 , BYVAL dwEncoding AS DWORD
 , BYREF pSrcStr AS ASCIIZ
 , BYREF pcSrcSize AS DWORD
 , BYREF pDstStr AS WSTRINGZ
 , BYREF pcDstSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD ConvertStringFromUnicode ( ' VTable offset = 44
 BYREF pdwMode AS DWORD
 , BYVAL dwEncoding AS DWORD
 , BYREF pSrcStr AS WSTRINGZ
 , BYREF pcSrcSize AS DWORD
 , BYREF pDstStr AS ASCIIZ
 , BYREF pcDstSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD ConvertStringReset ( ' VTable offset = 48
 ) AS LONG
 ' =====================================================================================
 METHOD GetRfc1766FromLcid ( ' VTable offset = 52
 BYVAL Locale AS DWORD
 , BYREF pbstrRfc1766 AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD GetLcidFromRfc1766 ( ' VTable offset = 56
 BYREF pLocale AS DWORD
 , BYVAL bstrRfc1766 AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD EnumRfc1766 ( ' VTable offset = 60
 BYVAL LangId AS WORD
 , BYREF ppEnumRfc1766 AS IEnumRfc1766
 ) AS LONG
 ' =====================================================================================
 METHOD GetRfc1766Info ( ' VTable offset = 64
 BYVAL Locale AS DWORD
 , BYVAL LangId AS WORD
 , BYREF pRfc1766Info AS RFC1766INFO
 ) AS LONG
 ' =====================================================================================
 METHOD CreateConvertCharset ( ' VTable offset = 68
 BYVAL uiSrcCodePage AS DWORD
 , BYVAL uiDstCodePage AS DWORD
 , BYVAL dwProperty AS DWORD
 , BYREF ppMLangConvertCharset AS IMLangConvertCharset
 ) AS LONG
 ' =====================================================================================
 METHOD ConvertStringInIStream ( ' VTable offset = 72
 BYREF pdwMode AS DWORD
 , BYVAL dwFlag AS DWORD
 , BYREF lpFallBack AS WSTRINGZ
 , BYVAL dwSrcEncoding AS DWORD
 , BYVAL dwDstEncoding AS DWORD
 , BYVAL pstmIn AS IStream
 , BYVAL pstmOut AS IStream
 ) AS LONG
 ' =====================================================================================
 METHOD ConvertStringToUnicodeEx ( ' VTable offset = 76
 BYREF pdwMode AS DWORD
 , BYVAL dwEncoding AS DWORD
 , BYREF pSrcStr AS ASCIIZ
 , BYREF pcSrcSize AS DWORD
 , BYREF pDstStr AS WSTRINGZ
 , BYREF pcDstSize AS DWORD
 , BYVAL dwFlag AS DWORD
 , BYREF lpFallBack AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD ConvertStringFromUnicodeEx ( ' VTable offset = 80
 BYREF pdwMode AS DWORD
 , BYVAL dwEncoding AS DWORD
 , BYREF pSrcStr AS WSTRINGZ
 , BYREF pcSrcSize AS DWORD
 , BYREF pDstStr AS ASCIIZ
 , BYREF pcDstSize AS DWORD
 , BYVAL dwFlag AS DWORD
 , BYREF lpFallBack AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD DetectCodepageInIStream ( ' VTable offset = 84
 BYVAL dwFlag AS DWORD
 , BYVAL dwPrefWinCodePage AS DWORD
 , BYVAL pstmIn AS IStream
 , BYREF lpEncoding AS DetectEncodingInfo
 , BYREF pnScores AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD DetectInputCodepage ( ' VTable offset = 88
 BYVAL dwFlag AS DWORD
 , BYVAL dwPrefWinCodePage AS DWORD
 , BYREF pSrcStr AS ASCIIZ
 , BYREF pcSrcSize AS LONG
 , BYREF lpEncoding AS DetectEncodingInfo
 , BYREF pnScores AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD ValidateCodePage ( ' VTable offset = 92
 BYVAL uiCodePage AS DWORD
 , BYVAL hwnd AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetCodePageDescription ( ' VTable offset = 96
 BYVAL uiCodePage AS DWORD
 , BYVAL lcid AS DWORD
 , BYREF lpWideCharStr AS WSTRINGZ
 , BYVAL cchWideChar AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD IsCodePageInstallable ( ' VTable offset = 100
 BYVAL uiCodePage AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetMimeDBSource ( ' VTable offset = 104
 BYVAL dwSource AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetNumberOfScripts ( ' VTable offset = 108
 BYREF pnScripts AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD EnumScripts ( ' VTable offset = 112
 BYVAL dwFlags AS DWORD
 , BYVAL LangId AS WORD
 , BYREF ppEnumScript AS IEnumScript
 ) AS LONG
 ' =====================================================================================
 METHOD ValidateCodePageEx ( ' VTable offset = 116
 BYVAL uiCodePage AS DWORD
 , BYVAL hwnd AS DWORD
 , BYVAL dwfIODControl AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD DetectOutboundCodePage ( ' VTable offset = 120
 BYVAL dwFlags AS DWORD
 , BYREF lpWideCharStr AS WSTRINGZ
 , BYVAL cchWideChar AS DWORD
 , BYREF puiPreferredCodePages AS DWORD
 , BYVAL nPreferredCodePages AS DWORD
 , BYREF puiDetectedCodePages AS DWORD
 , BYREF pnDetectedCodePages AS DWORD
 , BYREF lpSpecialChar AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD DetectOutboundCodePageInIStream ( ' VTable offset = 124
 BYVAL dwFlags AS DWORD
 , BYVAL pStrIn AS IStream
 , BYREF puiPreferredCodePages AS DWORD
 , BYVAL nPreferredCodePages AS DWORD
 , BYREF puiDetectedCodePages AS DWORD
 , BYREF pnDetectedCodePages AS DWORD
 , BYREF lpSpecialChar AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMultiLanguage3_INTERFACE_DEFINED__ */
#ENDIF ' /* __MultiLanguage_LIBRARY_DEFINED__ */
#IF NOT %DEF(%MLANG_H_API_DEF)
%EQUATE `MLANG_H_API_DEF = 1
'// APIs prototypes
DECLARE FUNCTION LcidToRfc1766 LIB "mlang.dll" ALIAS "LcidToRfc1766A" ( BYVAL Locale AS QUAD , BYREF pszRfc1766 AS ASCIIZ , BYREF iMaxLength AS LONG ) AS LONG
DECLARE FUNCTION LcidToRfc1766W LIB "mlang.dll" ALIAS "LcidToRfc1766W" ( BYVAL Locale AS QUAD
 , BYREF pszRfc1766 AS WSTRINGZ
 , BYREF nChar AS LONG
 ) AS LONG
DECLARE FUNCTION Rfc1766ToLcid LIB "mlang.dll" ALIAS "Rfc1766ToLcidA" ( BYREF pLocale AS DWORD
 , BYREF pszRfc1766 AS ASCIIZ
 ) AS LONG
DECLARE FUNCTION Rfc1766ToLcidW LIB "mlang.dll" ALIAS "Rfc1766ToLcidW" ( BYREF pLocale AS DWORD
 , BYREF pszRfc1766 AS WSTRINGZ
 ) AS LONG
DECLARE FUNCTION IsConvertINetStringAvailable LIB "mlang.dll" ALIAS "IsConvertINetStringAvailable" ( BYVAL dwSrcEncoding AS DWORD
 , BYVAL dwDstEncoding AS DWORD
 ) AS LONG
DECLARE FUNCTION ConvertINetString LIB "mlang.dll" ALIAS "ConvertINetString" ( BYREF lpdwMode AS DWORD
 , BYVAL dwSrcEncoding AS DWORD
 , BYVAL dwDstEncoding AS DWORD
 , BYREF lpSrcStr AS ASCIIZ
 , BYREF lpnSrcSize AS LONG
 , BYREF lpDstStr AS ASCIIZ
 , BYREF lpnDstSize AS LONG
 ) AS LONG
DECLARE FUNCTION ConvertINetMultiByteToUnicode LIB "mlang.dll" ALIAS "ConvertINetMultiByteToUnicode" ( BYREF lpdwMode AS DWORD
 , BYVAL dwEncoding AS DWORD
 , BYREF lpSrcStr AS ASCIIZ
 , BYREF lpnMultiCharCount AS LONG
 , BYREF lpDstStr AS WSTRINGZ
 , BYREF lpnWideCharCount AS LONG
 ) AS LONG
DECLARE FUNCTION ConvertINetUnicodeToMultiByte LIB "mlang.dll" ALIAS "ConvertINetUnicodeToMultiByte" ( BYREF lpdwMode AS DWORD
 , BYVAL dwEncoding AS DWORD
 , BYREF lpSrcStr AS WSTRINGZ
 , BYREF lpnWideCharCount AS LONG
 , BYREF lpDstStr AS ASCIIZ
 , BYREF lpnMultiCharCount AS LONG
 ) AS LONG
#ENDIF ' // _MLANG_H_API_DEF_
#ENDIF
