SINGLETON 
Author Message
 SINGLETON

Hello...

In this moment i have a problem...

I made a SINGLETON server...

DECLARE_CLASSFACTORY_SINGLETON(Class)

this server have only one instance in memory.

all the clients look the same object... but only one of the clients
have access to the server.

In other words. if one client call the function one of the server
the second client cant have access to the object...

What I have to do? I want that the client 2 call the functions on the server
whithout problem....I want  call functions in the same time.

sorry for my English...
and thank you for your help..



Tue, 01 Mar 2005 21:29:11 GMT  
 SINGLETON
i think u have register ur server with REGCLS_SINGLEUSE
make it as MULTIPLEUSE

Vinod



Quote:
> Hello...

> In this moment i have a problem...

> I made a SINGLETON server...

> DECLARE_CLASSFACTORY_SINGLETON(Class)

> this server have only one instance in memory.

> all the clients look the same object... but only one of the clients
> have access to the server.

> In other words. if one client call the function one of the server
> the second client cant have access to the object...

> What I have to do? I want that the client 2 call the functions on the
server
> whithout problem....I want  call functions in the same time.

> sorry for my English...
> and thank you for your help..



Wed, 02 Mar 2005 00:45:04 GMT  
 SINGLETON
What do you mean by "can't have access"? At what point does it fail?
--
With best wishes,
    Igor Tandetnik

"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken



Quote:
> Hello...

> In this moment i have a problem...

> I made a SINGLETON server...

> DECLARE_CLASSFACTORY_SINGLETON(Class)

> this server have only one instance in memory.

> all the clients look the same object... but only one of the clients
> have access to the server.

> In other words. if one client call the function one of the server
> the second client cant have access to the object...

> What I have to do? I want that the client 2 call the functions on the
server
> whithout problem....I want  call functions in the same time.

> sorry for my English...
> and thank you for your help..



Wed, 02 Mar 2005 03:48:40 GMT  
 SINGLETON
If the COM object is marked as apartment-threaded (ie. STA), then there is
only one thread servicing the COM object's methods and properties.

Changing it to free-threaded (MTA) may give you what you are looking for.

Be reminded of the dangers of singletons, by the way.



Sun, 06 Mar 2005 03:31:27 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Singleton not a singleton?

2. ATL Singleton and Singleton Class also from C++

3. new Singleton() ( Can I override the new operator to return a singleton?)

4. Singleton Design Pattern Question

5. Pleading for fresh eyes on my problem using a PropertyGrid with a Singleton

6. Singletons & delete error

7. singleton class please help

8. managed C++ Singleton and usage in VB

9. singleton

10. Why wrapping unmanaged C++ singletons can be dangerous

11. Subclassing Singleton

12. Singleton design approach

 

 
Powered by phpBB® Forum Software