Forexconnect with DELPHI

Moderator: Moderator

Forexconnect with DELPHI

Postby nicolas40 » Tue Jan 08, 2013 2:38 pm

Hello,

I wish to use FOREXCONNECTAPI with the language DELPHI.

Is it possible ?, and if yes how to make it

Thank you
nicolas40
 
Posts: 4
Joined: Wed Dec 05, 2012 10:06 am

Re: Forexconnect with DELPHI

Postby Ekaterina » Thu Jan 10, 2013 12:38 am

Hi nicolas40,

You can work with ForexConnect in Delphi through the COM library. ForexConnect COM library uses ForexConnect API version 1.2.2.

You can download the library here:
http://fxcodebase.com/wiki/index.php/Download

To learn how to start using the library, please read the Getting Started section in the .chm help file delivered with the library or here.

Best regards,
Ekaterina
Ekaterina
 

Re: Forexconnect with DELPHI

Postby nicolas40 » Thu Jan 10, 2013 5:27 am

Thank you Ekaterina,

I try it.
If it is necessary, new questions to come...
Now, I know that it possible, and I can continue with good hopes of success.

Thank you again for your answer

Best regards,
Nicolas
nicolas40
 
Posts: 4
Joined: Wed Dec 05, 2012 10:06 am

Re: Forexconnect with DELPHI

Postby nicolas40 » Sun Jan 13, 2013 10:47 am

Hello,

After multiple tries, I don’t arrive to use FOREXCONNECT under delphi.

I wrote a simple example which allowed to logger, then to read the prices EURUSD, it was using O2GO. I try simply to modify it to use FOREXCONNECT, but it refuses the compil on pbs of type, in particular with CREATEOLEOBJECT:
Code: fxtransport: = createoleobject (' fxcore2.com.transport ');
Compil: [error Main_nicolas_extract.pas ( 69 )]: incompatible Types(Chaps): ' IDispatch ' and ' ITransport '

As attachment this example of code.

Thank you for helping me by correcting my errors.
Attachments
Main_nicolas_extract.pas
(4.88 KiB) Downloaded 953 times
nicolas40
 
Posts: 4
Joined: Wed Dec 05, 2012 10:06 am

Re: Forexconnect with DELPHI

Postby Ekaterina » Tue Jan 15, 2013 5:56 pm

Hi nicolas40,

The possible problems are:

(1)
Problem with "COM wrapper" registration (fxcore2.com.dll).
Try to re-run .\bin-com\registerCom.bat and additionally read .\sources\com\readme.txt.

or

(2)
You can not use createoleobject for ITransport instance creation:

Code: Select all
Code: fxtransport: = createoleobject (' fxcore2.com.transport ');
Compil: [error Main_nicolas_extract.pas ( 69 )]: incompatible Types(Chaps): ' IDispatch ' and ' ITransport 


Please find in your documentation what function should be used exactly for Delphi or take any ready sample.

Our samples will also be helpful for you (.\samples\com)

Code: Select all
WScript.Echo "Manage offers using table manager"
Set core = CreateObject("fxcore2.com.Transport")


Best regards,
Ekaterina
Ekaterina
 


Return to ForexConnect API

Who is online

Users browsing this forum: No registered users and 7 guests

cron