[fpc-pascal] Non-Latin (non-English) identifiers for COM automation
max.vlasov at gmail.com
Sat Jun 22 09:40:40 CEST 2013
I did something like this. Luckily both Delphi and fpc have a function
variable VarDispProc doing all the job. So my function calling a name
without parameters look very simple
TVarDispInvoke = procedure(Result: PVariant; const Instance: Variant;
CallDesc: PCallDesc; Params: Pointer); cdecl;
function DCNA(Instance: Variant; const Name: string): Variant;
TVarDispInvoke(VarDispProc)(@Result, Instance, @CallDesc, Nil);
So for an OleVariant instance V the calls
are equivalent. Only that the latter can accept Cyrillic methods now
On Sat, Jun 22, 2013 at 12:40 AM, Sven Barth <pascaldragon at googlemail.com>wrote:
> On 21.06.2013 09:01, Max Vlasov wrote:
>> 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.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/**
> You might also try to find examples for Delphi where GetIDsOfNames and
> Invoke are used directly as I've never done this before...
> fpc-pascal maillist - fpc-pascal at lists.freepascal.**org<fpc-pascal at lists.freepascal.org>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal