MFC OLE Architecture and reference counting
pwadher -- pwadher@CADECSYSTEMS.COM
Wednesday, February 12, 1997
Environment: VC++ 4.2b, Win 95, NT 4.0
The project I am currently working on consists of an out-of-proc automation
server and a number of automation client applications. The automation
server does not have any UI, but exposes a number of collection objects
which the clients can use. Since I want to track individual instances of
each automation object I am registering each object with the running object
table. The problem I run into is that I cannot find a clear way of tracking
how many reference counts an object has at any instant of time. I am trying
to track any interface leaks which leave the server up even when no clients
are accessing it.
Is there any documentation which clearly explains how the various MFC OLE
classes operate. In debugging through the MFC code there are a number of
functions e.g. (ExternalRelease, InternalRelease etc. ) which seem to do a
lot of stuff with reference counts...However I cannot seem to find any real
documentation as to how the MFC OLE architecture is structured..
Thanks in advance....
PWADHER@CADECSYSTEMS.COM
Bing Hou -- hou@tfn.com
Friday, February 14, 1997
[Mini-digest: 2 responses]
The book 'MFC Internals' by George Shepherd and Scot Wingo has several
chapters on MFC OLE stuff, especially chapter 11 'How MFC Implements COM'
will solve some of your puzzels on how MFC keeps reference counting on each
object through CCmdTarget's implementation of IUnknown.
Bing Hou
hou@tfn.com
------------------------------------------------------------------------
"The saints are the sinners who keep on trying."
______________________________ Reply Separator _________________________________
Subject: MFC OLE Architecture and reference counting
Author: "pwadher" at Internet
Date: 2/12/97 3:00 PM
Environment: VC++ 4.2b, Win 95, NT 4.0
The project I am currently working on consists of an out-of-proc automation
server and a number of automation client applications. The automation
server does not have any UI, but exposes a number of collection objects
which the clients can use. Since I want to track individual instances of
each automation object I am registering each object with the running object
table. The problem I run into is that I cannot find a clear way of tracking
how many reference counts an object has at any instant of time. I am trying
to track any interface leaks which leave the server up even when no clients
are accessing it.
Is there any documentation which clearly explains how the various MFC OLE
classes operate. In debugging through the MFC code there are a number of
functions e.g. (ExternalRelease, InternalRelease etc. ) which seem to do a
lot of stuff with reference counts...However I cannot seem to find any real
documentation as to how the MFC OLE architecture is structured..
Thanks in advance....
PWADHER@CADECSYSTEMS.COM
-----From: Richard Morris
At 03:00 PM 2/12/97 -0500, you wrote:
>Environment: VC++ 4.2b, Win 95, NT 4.0
>Is there any documentation which clearly explains how the various MFC OLE
>classes operate. In debugging through the MFC code there are a number of
>functions e.g. (ExternalRelease, InternalRelease etc. ) which seem to do a
>lot of stuff with reference counts...However I cannot seem to find any real
>documentation as to how the MFC OLE architecture is structured..
One book you might check out is: Visual C++ 4 MasterClass by WROX Press.
It discusses a number of more advanced issues of OLE. If you live in the SF
Bay area, you can find it at Stacey's Bookstore.
****************************************************************
Live now.
Make now always the most precious time.
Now will never come again.
- Captain Jean-Luc Picard, U.S.S. Enterprise
Paul -- paulstemper@mpl1.ra.rockwell.com
Tuesday, February 25, 1997
There is a great book out called "MFC Internals." It has a lot of
information about the various MFC classes, and how they do that voodoo
they do.
It was written by George Shepherd & Scot Wingo (thanks guys.) It's ISBN
is: 0-201-40721-3, and it's list price is $39.95. It's definitely worth
it. It has about 221 pages on COM explaining how MFC implements it. It
has been invaluable to me.
Paul Stemper
Project Engineer
Rockwell Automation-DataMyte
Email: psstempe@mpl1.ra.rockwell.com
All comments that I have said (or thought) are my own. They do not
necessarily reflect those of my employer. So there...
-----Original Message-----
From: pwadher [SMTP:mfc-l@netcom.com]
Sent: Thursday, February 13, 1997 3:38 PM
To: mfc-l
Subject: MFC OLE Architecture and reference counting
Environment: VC++ 4.2b, Win 95, NT 4.0
The project I am currently working on consists of an out-of-proc
automation
server and a number of automation client applications. The automation
server does not have any UI, but exposes a number of collection objects
which the clients can use. Since I want to track individual instances of
each automation object I am registering each object with the running
object
table. The problem I run into is that I cannot find a clear way of
tracking
how many reference counts an object has at any instant of time. I am
trying
to track any interface leaks which leave the server up even when no
clients
are accessing it.
Is there any documentation which clearly explains how the various MFC OLE
classes operate. In debugging through the MFC code there are a number of
functions e.g. (ExternalRelease, InternalRelease etc. ) which seem to do
a
lot of stuff with reference counts...However I cannot seem to find any
real
documentation as to how the MFC OLE architecture is structured..
Thanks in advance....
PWADHER@CADECSYSTEMS.COM
------------------------- Original message header:
>MAIL FROM:
>RCPT TO:
>DATA
>Received: by extfw.mke.ra.rockwell.com; id PAA06311; Thu, 13 Feb 1997
15:39:53 -0600
>Received: from listless.netcom.com(206.217.29.105) by
extfw.mke.ra.rockwell.com via smap (3.2)
> id xma005445; Thu, 13 Feb 97 15:36:05 -0600
>Received: by majordomo.netcom.com (8.7.5/8.7.3/(NETCOM MLS v1.01)) id
JAA01578; Thu, 13 Feb 1997 09:00:12 -0800 (PST)
>Message-Id: <9702122003.AA01524@ceco1.cummins.com>
>From: "pwadher"
>To:
>Subject: MFC OLE Architecture and reference counting
>Date: Wed, 12 Feb 1997 15:00:40 -0500
>X-Msmail-Priority: Normal
>X-Priority: 3
>X-Mailer: Microsoft Internet Mail 4.70.1155
>Mime-Version: 1.0
>Content-Type: text/plain; charset=ISO-8859-1
Become an MFC-L member
| Вернуться в корень Архива
|