The rule is:
1) for each AddRef you call, call Release when interface is no longer needed
2) do not use interfaces without calling AddRef first

Exact reference counting is implementation depended - NM may hold references
to some objects. Do not count it.

HTH,

-----------
---------------------------------------------------------------
Alex Komissarov @ imagine multimedia ltd
www.imagineusa.com     [EMAIL PROTECTED]
voice: +972-2-6799644   fax: +972-2-6799641

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 15 December, 1999 15:12
Subject: [NetMeeting] NetMeeting SDK 2.1 COM interface


>
>
> Hello Guys!
>
> I  use  the  COM interface provided with the NetMeeting SDK 2.1 in order
to
> exchange data
> through a data channel, briefly in the following way:
>
> User A creates a conference using the COM interface
>       - saves the INmConference pointer (AddRef() returns counter = 3).
> User A hosts the conference using the COM interface
>       - saves the INmMember A pointer (AddRef() returns counter = 2).
> User A invites User B using the NetMeeting GUI
>       - saves the INmMember B pointer (AddRef() returns counter = 2).
> User A creates a data channel using the COM interface
>       - saves the INmChannelData pointer (AddRef() returns counter = 3).
> User B is warned that a conference is created
>       - saves the INmConference pointer (AddRef() returns counter = 3).
> User B is warned that a member A is added to the conference
>       - saves the INmMember A pointer (AddRef() returns counter = 2).
> User B is warned that a member B (himself) is added to the conference
>       - saves the INmMember B pointer (AddRef() returns counter = 2).
> User B creates a data channel using the COM interface
> - saves the INmChannelData pointer (AddRef() returns counter = 3).
>
>
> User  B  leaves the conference, using the NetMeeting GUI. he is warned
that
> member A is removed from
> both the conference then the data channel
>       - unsaves the INmMember A pointer (Release() returns counter = 3).
> User  B  is  warned  that member B (himself) is removed from both  the
data
> channel then the conference
>       - unsaves the INmMember B pointer (Release() returns counter = 2).
> User B is warned that the data channel is removed from the conference
>      - unsaves the INmChannelData pointer (Release() returns counter = 3).
>      -  unsaves the INmConference pointer ((emovedRelease() returns
counter
> = 0).
> Meanwhile,  User  A  is warned that member B is removed from both  the
data
> channel then the conference
>       - unsaves the INmMember B pointer (Release() returns counter = 1).
> Then  User  A leaves the conference, using the NetMeeting GUI, he is
warned
> that member A (himself)
>  is removed from both  the data channel then the conference
>       - unsaves the INmMember A pointer (Release() returns counter = 2).
> User A is warned that the data channel is removed from the conference
>      - unsaves the INmChannelData pointer (Release() returns counter = 3).
>      -  unsaves the INmConference pointer ((emovedRelease() returns
counter
> = 1).
>
> Question 1: Can anybody (from the NetMeeting team? Brian?) explain me
these
> values
> of reference counters for each the four objects for each of the 2 members?
>
> Question  2:  I have noticed that members and data channels can not be
used
> as soon as the
> connection point sink objects have been warned that they have been
created.
> I consider that I can use a INmMember when the GetID() method returns
S_OK.
> I  consider  that  I  can  use  a INmChannelData when the IsActive()
method
> returns S_OK.
> Is it true, and/or is it a more reliable way to know when one can use
these
> objects?
>
> Best regards,
> Jerome Faugeras.
>
>
> -----------------------------------------------------------------------
> http://www.meetingbywire.com/Mailinglist.htm for unsubscribe information
> -----------------------------------------------------------------------
>
>

-----------------------------------------------------------------------
http://www.meetingbywire.com/Mailinglist.htm for unsubscribe information
-----------------------------------------------------------------------

Reply via email to