TWSLink FAQ

back

  Q:    When I call one of the exported functions or a specific exported function, the calling application or script crashes or hangs and function never returns.
 

This mostly happens due to a wrong list of parameters passed to the exported function or due to incompatible datatypes for one ore more parameters passed to exported functions. Check the list of parameters encountered in the documentation of TWSLink and compare this list with the parameters passed on call in your application or script. The number of passed parameters must exactly match to the number given in the documentation. The single and total number of bytes for each and all parameters must exactly match to the number of bytes resulting by the number of paramters. The are only 3 diferent types of parameters for all exported functions:
                long
(integer) and       4 Bytes.
                char pointer
(string)    4 Bytes.
                double (decimal) -      8 Bytes.
 

  Q: When I place an order and after this attach another order and transmit the parent order or the client order, then parent- or client order sometimes stays untransmitted to IB.
 

This can happen if one of the orders are already known at TWS Side (Transmission Flag >= 0) before they got attached. The savest and smartest method to place attached orders or more generally spoken: to change order properties (an attachment is an order property) is to perform all changes before the order is known at TWS Side and then to transmit a complete order in one step. That is by setting the transmission flag to -1 first and after having changed all order properties to call Function Transmit.

   
  Q: Positions for CASH Contracts are always returned with ZERO.
  Open TWS Account Window and check field "Include FX positions in portfolio".
   
  Q: When installing on Windows Vista, i get Error 1904 (HRESULT -2147220473).
  Disable UAC for installation, install and re-enable UAC.
   
  Q: When installing on Windows 7, i get Error 1904 (HRESULT -2147220473).
  Set UAC to lowest level, restart Windows, install and restore UAC level.
   
  Q: Can i install TWSLink on Windows 2003 - Windows Server 2008 R2, Windows 7 - 64 Bit.
  Yes. TWSLink is a 32 Bit DLL, which can be used in any 32 Bit process. So each 32 Bit Application / Environment running on a 64 Bit machine, can load TWSLink.