Opening one of the installed instances of Amibroker through OLE

I have 2 Amibroker installations on my windows.When I use OLE to create Amibroker object , which amibroker object is created? My understanding is it is creating object of my first installation. But i don’t have proper knowledge which Amibroker is being created and how i could create object of other Amibroker installation?

oAB = new ActiveXObject("Broker.Application");

Sorry correction ,it is creating object of my last installation.

I suggest you try launching the version of AmiBroker you want before connecting the OLE client to AmiBroker.

Here are some tips for use OLE:

  • OLE clients connect to AmiBroker processes with matching bitness (32-bit or 64-bit).
  • If AmiBroker is already running before you run the OLE client, the client will connect to the already running AmiBroker process.
  • If more than one instance of AmiBroker is running, the OLE client will connect to the first launched AmiBroker instance.
  • If you want to run many OLE client scripts concurrently, you can run different scripts while logged into different Windows user accounts.
  • 32-bit clients can control 32-bit AmiBroker concurrently with 64-bit clients controlling 64-bit AmiBroker. You can run both concurrently with a single user account.
1 Like

So both my installations are 32 bit . My point was irrespective of which Amibroker is running currently, it always launches one particular Ami. I think it is do with default , so "Broker.application" is creating an object of default Amibroker.

This is the way how OLE works. If server is running already, it connects to first running instance with matching bitness. If it is not running then it runs new instance.

Hi Guys,

Is there any way tor run 2 ole instances for 2 instances of 64 bit amibroker? without loggin into different windows user accounts as suggested by Steve?

Thanks.

Seems like the answer is no