Click here to Skip to main content
15,917,321 members
Home / Discussions / COM
   

COM

 
GeneralRe: Inproc Server in a Surrogate Process Pin
Anonymous25-Jun-03 11:14
Anonymous25-Jun-03 11:14 
Generalevents fired by Internet Explorer Pin
shai197423-Jun-03 11:18
shai197423-Jun-03 11:18 
GeneralRe: events fired by Internet Explorer Pin
Amit Dey26-Jun-03 13:52
Amit Dey26-Jun-03 13:52 
GeneralRe: events fired by Internet Explorer Pin
shai197426-Jun-03 13:54
shai197426-Jun-03 13:54 
GeneralRegistering a class Pin
tessierjf23-Jun-03 4:37
tessierjf23-Jun-03 4:37 
Generaltest container crashes Pin
safee ullah22-Jun-03 21:16
safee ullah22-Jun-03 21:16 
GeneralRe: test container crashes Pin
Marion2827-Jun-03 4:42
Marion2827-Jun-03 4:42 
GeneralCOM Question Pin
Nick Parker22-Jun-03 4:39
protectorNick Parker22-Jun-03 4:39 
I have been reading Visual C++.NET by George Shepherd and I ran into something that didn't quite jive with me. Look at the following first:

struct CSpaceship : IMotion. IDisplay
{
ULONG m_cRef;
//...

HRESULT QueryInterface(REFIID riid, 
                       void** ppv);
  ULONG AddRef()
  {
     return InterlockedIncrement(&m_cRef);
  }

  ULONG Release()
  {
     ULONG cRef = InterlockedIncrement(&m_cRef);
     if(cRef == 0)
     {
         delete this;
         return 0;
     }
     else
         return m_cRef;
  }

//...
};


Possibly this isn't a complete implementation of Release(); but shouldn't m_cRef be decremented somewhere in Release();? I can't see how the InterlockedIncrement(); could do this because it is being called in AddRef(); as well as in the Release(); method.

-Nick Parker
GeneralRe: COM Question Pin
valikac22-Jun-03 7:32
valikac22-Jun-03 7:32 
GeneralRe: COM Question Pin
Aravinthan25-Jun-03 3:08
Aravinthan25-Jun-03 3:08 
QuestionHow can my ActiveX control get the data of the file which locates on the server? Pin
stanley guan21-Jun-03 1:18
stanley guan21-Jun-03 1:18 
AnswerRe: How can my ActiveX control get the data of the file which locates on the server? Pin
valikac21-Jun-03 7:41
valikac21-Jun-03 7:41 
GeneralCOM interop in .NET Pin
slnarasimhan19-Jun-03 22:28
slnarasimhan19-Jun-03 22:28 
GeneralThird party program library method calls invocation Pin
yeeck19-Jun-03 21:14
yeeck19-Jun-03 21:14 
GeneralCOM+ Error Pin
Aky18-Jun-03 23:31
Aky18-Jun-03 23:31 
GeneralRe: COM+ Error Pin
Steve S23-Jun-03 21:50
Steve S23-Jun-03 21:50 
GeneralRe: COM+ Error Pin
Aravinthan25-Jun-03 3:11
Aravinthan25-Jun-03 3:11 
QuestionInproc COM server question? Pin
Obi-Wan-Kenobi17-Jun-03 18:30
Obi-Wan-Kenobi17-Jun-03 18:30 
AnswerRe: Inproc COM server question? Pin
valikac18-Jun-03 6:57
valikac18-Jun-03 6:57 
AnswerRe: Inproc COM server question? Pin
Giles22-Jun-03 5:08
Giles22-Jun-03 5:08 
GeneralMSWord Applications Pin
Madmaximus17-Jun-03 10:01
Madmaximus17-Jun-03 10:01 
GeneralUse GetActiveObject first Pin
Vi219-Jun-03 19:58
Vi219-Jun-03 19:58 
GeneralRe: Use GetActiveObject first Pin
Madmaximus20-Jun-03 4:56
Madmaximus20-Jun-03 4:56 
GeneralActiveX stock property issue Pin
Marion2817-Jun-03 7:41
Marion2817-Jun-03 7:41 
Questionhow do i know whether an interface is createable or not? Pin
safee ullah16-Jun-03 0:25
safee ullah16-Jun-03 0:25 

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.