How to include ForexConnect API in .Net

Brief

The article discusses how to include ForexConnect API in .Net 2.0 and 4.0 application.

Details

To include ForexConnect API in your .Net 2.0 application, you should:

  1. Place your application program in the same directory where supporting dlls are located (usually the bin folder containing expat.dll,fxcore2.dll,fxmsg.dll, etc.). You can do this by either building your executable into the folder with supporting dlls or by copying the required dlls into your target directory. For example, if the folder C:\ForexConnectAPI\bin contains these libraries, a post-built event command line can look like this:

    copy C:\ForexConnectAPI\bin\*.dll "$(TargetDir)"
  2. Add net\dotnet20\fxcore2.dll as a reference to your project.

  3. Add namespace fxcore2 to your project:

    using fxcore2;

To use ForexConnect API in your .Net 4.0 application, you should:

  1. Place your application program in the same directory where supporting dlls are located (usually the bin folder containing expat.dll,fxcore2.dll,fxmsg.dll, etc.). You can do this by either building your executable into the folder with supporting dlls or by copying the required dlls into your target directory. For example, if the folder C:\ForexConnectAPI\bin contains these libraries, a post-built event command line can look like this:

    copy C:\ForexConnectAPI\bin\*.dll "$(TargetDir)"
  2. Add net\dotnet40\fxcore2.dll as a reference to your project.

  3. Add namespace fxcore2 to your project:

    using fxcore2;

back