I have RTD server in Excel, which pull data from thinkorswim application. I would like to pull data into C# instead. I have limited programming experience and therefore read multiple tutorials on RTD server implementation in C#, but most of the them are two advanced for me. So I wonder if anybody could suggest some introductory reading materials. Here is sample code that I am trying to implement:
http://awkwardcoder.com/2014/01/24/excel-rtd-client-in-c/
I copied and pasted it into Visual Studio (VS) and called class RtdClient.cs. VS immediately highlighted the following line:
ComImport, TypeLibType((short)0x1040)
MarshalAs
MethodImpl
and wrote the type and namespace could not be found.
Am I missing any references? I added reference on COM type Tos.RTD, but it did not help.
Also in registry I found folder with Tos.RTD and CLSID. I assume that CSLID points to COM type?
In VS Tos.RTD has a couple of interfaces. In the above link, I don't see implementation of the methods of these interfaces. What is wrong?
I also read following RTD through reflection I understand that second link relies on reflection. What are benefits/drawbacks of both approaches? Which one is conceptually more meaningful?
As you can seem I am lost, so any suggestions would be greatly appreciated.
An RTD Server is explicitly for Excel and won't help you in C#. You could decompile it I suppose and look to see how it gets it data from ThinkOrSwim, but I would imagine they have an API you could use already if you look around more.