matlabapiwindows64interactive-brokers

Side by side error running Interactive Brokers API with Matlab on Windows 7 (64 bit)


Recently I have tried to connect to Interactive Brokers API using Trading Toolbox on Matlab 2015a running on Windows 7 (64 Bit) machine. TWS and IB API were installed already.

Matlab was throwing a side by side eror.

Windows Event Viewer Error Log was the following:

Activation context generation failed for "C:\TWS API\bin\ActiveX\Tws.ocx". Dependent Assembly Microsoft.VC80.MFC,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50608.0" could not be found. Please use sxstrace.exe for detailed diagnosis.

First I have searched for solutions by error messages. There were several recommendations but they were not specific to Windows 64 bit and were not working in this case.


Solution

  • The solution that worked was described in Interactive Brokers API reference Guide here (ActiveX > Running the ActiveX API on 64-bit Windows XP Systems).

    It involved installing these dependencies:

    1. Microsoft Visual C++ 2005 SP1 Redistributable Package (x86)
    2. Microsoft Visual J# 2.0 Redistributable Package.