Hi folks. I'm not sure if I'm heading in the right direction with this - I haven't really touched on ActiveX EXEs and automation servers before...

I have two applications which both access data through an object model - called DataStore - which is in a DLL. It exposes classes which simply wrap records in the underlying SQL tables. App1 is effectively a database maintenance utility, the user defines his world by going in here and having a user-friendly front-end. App2 does interesting simulation work using the same data, and therefore it uses the same DLL for its DataStore. Both Standard EXEs, both work fine.

I need to develop network capabilities for App2. The idea is that someone else comes along and runs their own simulation, using the same data as the first user. Due to the way this can be used, any machine can host data, but at any time, it's only one machine whose data is relevant. All subsequent users in a session use the same data set, so it has to stay in its own address space.

I've figured out a logging in protocol using Winsock. If I start App2, I'm going to say whether I'm a server or a client, then either (server) I either use my own data, or (client) the selected server sends me enough info down Winsock for me to use GetObject on the server's copy of DataStore.

1st question: is this valid? Can I access a class built in VB6 using GetObject? I've seen somewhere that it's not allowed, but maybe the use case for that was different. One way or another, I have to bind server and client on the fly, they're not aware of each other's existence until the app is launched.

Of course, if I'm a server, I can access my own data, so I use CreateObject to get my own reference to DataStore (and now my machine hosts the only instance of it during this session, amongst all users).

My scheme is to covert App2 into an ActiveX EXE, exposing an Application object the same way Excel does it, so I can remotely access DataStore (and one or two other application-specific properties and methods) through my Application object.

I tried setting it up this way, and the app no longer opens up its own copy of DataStore properly. It tells me 'ActiveX component can't create object' as soon as I try to access any of its properties.

What's going on? If ActiveX EXEs isn't the right way forward for me, then what's the alternative?