createoleobject

Delphi CreateOleObject events

送分小仙女□ 提交于 2019-12-30 07:10:28
问题 There is a code: var myobject: OleVariant; begin myobject := CreateOleObject('SomeNamespace.SomeClass'); end; This COM object has events (for example OnClick). How should I connect to these events without importing TLB? 回答1: You are working with COM late-binding, so do you need write a lot of code to handle events. this task is not difficult if you know COM, basically do you need follow these steps. Create a new object(class) derived from TInterfacedObject that implements IDispatch implement

Delphi CreateOleObject events

不想你离开。 提交于 2019-12-01 00:02:31
There is a code: var myobject: OleVariant; begin myobject := CreateOleObject('SomeNamespace.SomeClass'); end; This COM object has events (for example OnClick). How should I connect to these events without importing TLB? You are working with COM late-binding, so do you need write a lot of code to handle events. this task is not difficult if you know COM, basically do you need follow these steps. Create a new object(class) derived from TInterfacedObject that implements IDispatch implement the Invoke() function of your new class Query for the connection point container ( IConnectionpointContainer

Delphi SAPI Text-To-Speech

只谈情不闲聊 提交于 2019-11-29 08:21:51
问题 First of all: this is not a duplicate of Delphi and SAPI. I have a specific problem with the "SAPI in Delphi" subject. I have used the excellent Import Type-Library guide in Delphi 2009 to get a TSpVoice component in the component palette. This works great. With var SpVoice: TSpVoice; I can write SpVoice.Speak('This is an example.', 1); to get asynchronous audio output. First question According to the documentation, I would be able to write SpVoice.Speak('This is an example.', 0); to get