Click here to Skip to main content
15,895,142 members
Home / Discussions / COM
   

COM

 
GeneralRe: Active X installation Pin
31-Jul-01 1:07
suss31-Jul-01 1:07 
GeneralDoModal from an Interface (Simple Object) Pin
26-Jul-01 2:09
suss26-Jul-01 2:09 
GeneralDirectShow Pin
25-Jul-01 5:25
suss25-Jul-01 5:25 
QuestionCan't register the service? Pin
zhaoyong25-Jul-01 2:17
zhaoyong25-Jul-01 2:17 
AnswerRe: Can't register the service? Pin
Not Active25-Jul-01 3:22
mentorNot Active25-Jul-01 3:22 
GeneralGetProperty and VARIANT Pin
AlexEg24-Jul-01 23:34
AlexEg24-Jul-01 23:34 
Generalwhen to call AddRef() and Release Pin
pathi24-Jul-01 21:26
pathi24-Jul-01 21:26 
GeneralRe: when to call AddRef() and Release Pin
Jesse Rosalia16-Aug-01 19:55
Jesse Rosalia16-Aug-01 19:55 
Im not familiar with COM aggregation, but I think I can still shed some light on this subject... The purpose of AddRef() and Release(), and the whole reference counter thing, is to insure that a resource isn't unloaded/deallocated/deleted/otherwise removed from existance before everyone is done using it. For instance, when you create a COM object, the counter gets set to 1. When you are done with this object, you call Release(), which brings the counter to 0. There is code (or should be code, if you are implementing these functions yourself) inside Release() that resembles...

if (--m_nRef == 0)
delete this;
return m_nRef;

which says "When my reference counter goes to 0, I delete myself, because I am no longer needed." For these reasons, it is recommended you AddRef() every time you store another copy of a interface pointer, and Release when you are done with that pointer, however you do not need to be that crazy about it if you have absolute apriory knowledge that your pointer will not be pulled out from under you. Keep in mind that CoCreateInstance(Ex) sets the reference counter to 1, and QueryInterface makes an implicit AddRef() call, as does many other functions used in creating/connecting to a COM object.

Hope this helps.

-Jesse
QuestionHow does IOleInPlaceObjectWindowless work? Pin
Kastellanos Nikos24-Jul-01 1:15
Kastellanos Nikos24-Jul-01 1:15 
AnswerRe: How does IOleInPlaceObjectWindowless work? Pin
Kastellanos Nikos24-Jul-01 22:46
Kastellanos Nikos24-Jul-01 22:46 
Generaldynamically displaying content in IE Plugin Pin
Amit Dey23-Jul-01 19:49
Amit Dey23-Jul-01 19:49 
GeneralRe: dynamically displaying content in IE Plugin Pin
Erik Thompson24-Jul-01 7:24
sitebuilderErik Thompson24-Jul-01 7:24 
QuestionInstantiate a COM DLL remotely? Pin
Matt Philmon23-Jul-01 18:13
Matt Philmon23-Jul-01 18:13 
AnswerRe: Instantiate a COM DLL remotely? Pin
Jesse Rosalia16-Aug-01 19:47
Jesse Rosalia16-Aug-01 19:47 
GeneralIDispatch Pin
23-Jul-01 15:12
suss23-Jul-01 15:12 
GeneralWMI Security Problem... Pin
Mario M.23-Jul-01 7:39
Mario M.23-Jul-01 7:39 
GeneralActive X Control - Redrawing Pin
Jared Allen23-Jul-01 3:32
Jared Allen23-Jul-01 3:32 
GeneralRe: Active X Control - Redrawing Pin
23-Jul-01 8:21
suss23-Jul-01 8:21 
GeneralRe: Active X Control - Redrawing Pin
23-Jul-01 21:18
suss23-Jul-01 21:18 
GeneralActiveX Control in an Composite Control Pin
22-Jul-01 6:00
suss22-Jul-01 6:00 
GeneralRe: ActiveX Control in an Composite Control Pin
Hadi Rezaee28-Jul-01 19:14
Hadi Rezaee28-Jul-01 19:14 
GeneralActiveX control in an Composite Control Pin
22-Jul-01 5:58
suss22-Jul-01 5:58 
GeneralActiveX control in an Composite Control Pin
22-Jul-01 5:58
suss22-Jul-01 5:58 
GeneralRe: ActiveX control in an Composite Control Pin
Not Active22-Jul-01 10:18
mentorNot Active22-Jul-01 10:18 
GeneralRe: ActiveX control in an Composite Control Pin
22-Jul-01 21:37
suss22-Jul-01 21:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.