[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ms-atl
Subject:    IMoniker/Object lifetime/RegisterObjectParam question.
From:       kevin.burton () EXGATE ! TEK ! COM
Date:       1998-09-29 13:37:01
[Download RAW message or body]


I currently have implemented two custom IMoniker classes (Based on the base
class that Chris Sells put up on his WEB page. Thank you, Chris.) The hard
part is that the object that is bond to the last moniker is dependent on not
only the object bound to the first moniker but the object must be active
(running). The first object is a "signon" object. The second is an object
that represents some resources that are accessible to the signed on object.

If I BindToObject I get an interface to the second object and this works
just fine. But, when I am "done" with the second object I need to "signoff",
essentially releasing the first object. I have been able to acheive this
effect by putting an interface pointer to the first object in the Global
Interface Table on construction of the second object and removing it and
destroying it when the second object is destroyed. I was wondering if this
is an appropriate place to start thinking about the RegisterObjectParam as
part of IBindCtx? When IBindCtx is released are the objects registered
automatically released also? I would like to try to avoid explicitly passing
an interface pointer to the second object as I think this binds the two
together too much. But, maybe that is the best that can be done. Comments?

Thank you again.

Kevin Burton
Kevin.Burton@tek.com

----------------------------------------------------------------
Users Guide http://www.microsoft.com/workshop/essentials/mail.asp
contains important info including how to unsubscribe.  Save time, search
the archives at http://discuss.microsoft.com/archives/index.html

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic