Article ID: 107698 - Last Review: August 9, 2004 - Revision: 3.3 MultLing.exe - Multilingual OLE Automation ObjectThis article was previously published under Q107698 On This PageSUMMARY MultLing.exe demonstrates how to create an OLE automation
object that supports multiple languages. This allows the controller of an
automation object to access properties and methods using any of the languages
that are supported. MORE INFORMATIONThe
following files are available for download from the Microsoft Download
Center: MultLing.exe (http://download.microsoft.com/download/ole/ole/1/n351/en-us/multling.exe) For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base: 119591
(http://support.microsoft.com/kb/119591/EN-US/
)
How to Obtain Microsoft Support Files from Online Services
Microsoft scanned this file for viruses. Microsoft used the most
current virus-detection software that was available on the date that the file
was posted. The file is stored on security-enhanced servers that help to
prevent any unauthorized changes to the file.
This multilingual OLE automation object sample checks the Locale ID (LCID) passed methods of the IDispatch interface to determine the language being used by the automation controller. The object supports access of properties and methods in English, French, and German. One Type Library Per LanguageThe automation object registers three different type libraries in the registration database--one for each supported language. The type libraries have the same UUIDs but different locale attributes. Each type library is loaded at object creation and the ITypeInfo interface is obtained from each as follows (see LoadTypeInfo in MAIN.CPP):Interpret LCID in IDispatch MethodsThe implementation of IDispatch::GetTypeInfo, GetIDsOfNames, and Invoke checks the value of the lcid parameter to determine the locale ID and uses the appropriate ITypeInfo for that language (See CHello::GetTypeInfo, GetIDsOfNames, and Invoke in HELLO.CPP).To RunThe multilingual automation object exposes one VT_BSTR property (HelloMessage) and one method (SayHello).
Method and Property Names:
English French German Action
HelloMessage SalutMessage HalloNachricht Sets or gets the
HelloMessage string.
SayHello DitSalut SagHallo Displays the HelloMessage
in an edit control.
Update the path in HELLO.REG to the current location of the object and the type libraries. To CompileRequires OLE 2.01 or later.Include device=vmb.386 in the [386Enh] section of SYSTEM.INI. NOTE: vmb.386 can be found in \OLE2\BIN. Run the WXSERVER.EXE from \OLE2\BIN before running the makefile. | Article Translations
|
Back to the top
