How can I create a RTD Client on Delphi? I have no idea how to start, I need to get values almost like an Excel spreadsheet, something like
=RTD("gartle.rtd",,"YahooFinanceWatchList","AAPL","Open")
How can I create a RTD Client on Delphi? I have no idea how to start, I need to get values almost like an Excel spreadsheet, something like
=RTD("gartle.rtd",,"YahooFinanceWatchList","AAPL","Open")
It says here: http://support.microsoft.com/kb/285339 that to provide an RTL server to Excel you need to implement the IRtdServer
interface, by this logic, you should be able to instantiate an existing implementation using default COM methods yourself. (YMMV)
As Stijn mentioned, you need to create a COM automation object which implements IRtdServer. The Delphi declarations for this is below:
// *********************************************************************//
// Interface: IRTDUpdateEvent
// Flags: (4416) Dual OleAutomation Dispatchable
// GUID: {A43788C1-D91B-11D3-8F39-00C04F3651B8}
// *********************************************************************//
IRTDUpdateEvent = interface(IDispatch)
['{A43788C1-D91B-11D3-8F39-00C04F3651B8}']
procedure UpdateNotify; safecall;
function Get_HeartbeatInterval: Integer; safecall;
procedure Set_HeartbeatInterval(plRetVal: Integer); safecall;
procedure Disconnect; safecall;
property HeartbeatInterval: Integer read Get_HeartbeatInterval write Set_HeartbeatInterval;
end;
// *********************************************************************//
// Interface: IRtdServer
// Flags: (4416) Dual OleAutomation Dispatchable
// GUID: {EC0E6191-DB51-11D3-8F3E-00C04F3651B8}
// *********************************************************************//
IRtdServer = interface(IDispatch)
['{EC0E6191-DB51-11D3-8F3E-00C04F3651B8}']
function ServerStart(const CallbackObject: IRTDUpdateEvent): Integer; safecall;
function ConnectData(TopicID: Integer; var Strings: PSafeArray; var GetNewValues: WordBool): OleVariant; safecall;
function RefreshData(var TopicCount: Integer): PSafeArray; safecall;
procedure DisconnectData(TopicID: Integer); safecall;
function Heartbeat: Integer; safecall;
procedure ServerTerminate; safecall;
end;