|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Jesus Hellin (jhellin
NATURALTOOLS.TV)Date: Fri Apr 26 2002 - 04:07:39 CDT
Hi,
>
> I added a the following line in my CMyClass.h file
> DECLARE_CLASSFACTORY_SINGLETON(CMyClass) as the project is created with
ATL
> to make it a singleton object, compiling go fine.
Ok.
>
> Now I am getting a little bit confused with the answer you gave in your
> previous mail.
> As now it is singleton which means globaly only one instance is availble.
> For a normal singleton pattern, there are "CreateIntance" method (to
create
> the instance, if not already created) and "Instance" method to get back a
> pointer to already created instance.
>
Yes, you always have one instance for each client.
> Now I wonder if there are any corresponding "Instance" method as I have
> declared my CMyClass as singleton to get a pointer to already existing
> object.
> What I find in the mail archive and MSDN is a number of "GetObject(...)"
> methods differing in parameters?
> Is it what I need instead of "Instance" method, in that case which one
> because there a number of "GetObject(...)" with different parameters.
>
> Is this solution different from the one you described in your previous
mail,
> in that case would you please explain little more what you actually meant?
I'm working with the solution of singleton and a function that I ask if this
enable to use this object, because I can decide in run time which way
follows.
I'm sorry I dont' work the function GetObject().
Regards,
JHellin
----------------------------------------------------------------
Users Guide http://discuss.microsoft.com/archives/mailfaq.asp
contains important info. Save time, search the archives at
http://discuss.microsoft.com/archives/index.html .
To unsubscribe, mailto:DCOM-signoff-request
DISCUSS.MICROSOFT.COM
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]