[fpc-pascal] Non-Latin (non-English) identifiers for COM automation

Sven Barth pascaldragon at googlemail.com
Fri Jun 21 22:40:38 CEST 2013


On 21.06.2013 09:01, Max Vlasov wrote:
> Hi,
>
> is it possible for fpc to allow using non-english characters for symbols
> when COM-automation is used?
> An accountant-related application very popular here in Russia mostly
> uses Cyrillic symbols for naming methods and properties of their OLE
> Object. They probably have English counterparts, but they're very hard
> to find since not so many uses this software outside of Russia.
>
> Delphi starting some version seems to support non-latin identifiers, at
> least I saw examples at the web. But I currently doesn't have access to
> latest versions.
>
> Or is there any other way to access some ole identifier other than
> direct referencing so instead of
> ...
>    OleVariant.SomeMethodMaybeNonLatin...
> ...
>    OleVariant.IntermediateAccess('SomeMethodMaybeNonLatin') ....

It *should* work by casting your OleVariant to a IDispatch (e.g. 
IDispatch(MyOleVariant) ) and then calling GetIDsOfNames and Invoke. For 
more information please take a look at the MSDN documentation of 
IDispatch here: 
http://msdn.microsoft.com/en-us/library/windows/desktop/ms221608%28v=vs.85%29.aspx
You might also try to find examples for Delphi where GetIDsOfNames and 
Invoke are used directly as I've never done this before...

Regards,
Sven



More information about the fpc-pascal mailing list