Author |
Topic: Remoteing in Detail (6 messages, Page 1 of 1) |
||||
---|---|---|---|---|---|
Moderators: VPfau | |||||
TTrushar Posts: 7 Joined: May 04, 2009 |
hi,
i want to use remoting but i donot know how to... i tried pdf in documents but that way it is not working! i have a main application that connects using login and pass to server using client.connect(.....) and works fine in this primary app i mention oec.api.remotehostingenabled=true. now i am working on diffrent solution where i make one object of client and i write client.createinstance(true). everything mentioned in document but i am not getting any event etc from primary application to this application. well in main application everything works fine.... can you please give me detailed info how to get connected to primary applciation... via remoting... thanks Trushar Kapadia |
||||
VictorV Posts: 746 Joined: May 08, 2007 |
Hello,
What kind of application is the second one: Windows Forms or Console Application? All events go through a thread that created the instance of OECAPI and this thread should pump Windows messages. |
||||
TTrushar Posts: 7 Joined: May 04, 2009 |
the first and second application both are windows forms application.
first application has something like OEC.API.OECClient.Global.RemoteHostingEnabled = True Me.client.RemoteHostingEnabled = True where me.client is a objectr of api.oecclient here in this application all the events are handled and working fine eg. onlogin complete etc. iget all the data like trades charts etc. --------- now the second application just do object.createinstance(true)... and has all the events of oecclietn object is there anything else i need to do with second applciation??? and what is windows messages???? Trushar Kapadia |
||||
VictorV Posts: 746 Joined: May 08, 2007 |
Hello,
did you test your second application with OEC Trader with enabled "Allow Remoting"? |
||||
TTrushar Posts: 7 Joined: May 04, 2009 |
my second application has just nothing
it only has client.createinstance(true) and events of client object. i read some tihing about remoting on google. so i want to know how to send windows messages to the remote application which is a main application and has a connection to oecapi. please provide me some syntex. if you have any example then that would be more helpful. thanks Trushar Kapadia |
||||
VictorV Posts: 746 Joined: May 08, 2007 |
If you are using Windows Forms, you don't need to code message pumping by yourself.
You can use our sample (http://www.openecry.com/services/api_highlights.cfm?ClientUpdate=0_5001) and modify it to test your applications. You need the next modifications there: 1. For master application please add m_cli.RemoteHostingEnabled = true; in MainForm constructor 2. For second application please change OECClient m_cli = new OECClient(); to OECClient m_cli = OECClient.CreateInstance(true); That's all. After that you need to run the master application and then the second one to see remoting in action. |
||||