[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

marzec

10/20/2004 4:15:00 PM

Hi there!

I wrote a singleton-server (exe) with ATL using
DECLARE_CLASSFACTORY_SINGLETON.
A DLL server has an activeX who instantiate this singleton-server.
The activeX has as properties:
RemoteServer, UserName, UserPass

If RemoteServer property is the same as the Loacal machine then the
activeX instantiates the singleton-server with smart pointer
CreateInstance...


If RemoteServer property is different as the Loacal machine then the
activeX instantiates the singleton-server with CoCreateInstanceEx...

The singleton-server is configured to run under "this user" and the
user has launch and access permissions.

It works fine if I connect to the server from the local machine.
It does not work when the server is running and I connect from another
machine.

When I start first the client application from Server machine then the
singleton-server starts (task manager...shows the right user.. etc).
When I Start then from the remote machine the same client application,
the client application hangs in FindConnectionPoint function from
ATLAdvise and i receive a Server busy message!

Reversing the order: start first the remote client and after the same
client on server causes no problem.

Something has to do with the singleton because if I remove the
singleton line from the singleton server then both application are
able to start the server!

Any ideas what could go wrong?