Click here to Skip to main content
15,912,837 members
Home / Discussions / COM
   

COM

 
QuestionActiveX Controls Pin
Ashwin kumar Gurujala26-Sep-05 18:14
Ashwin kumar Gurujala26-Sep-05 18:14 
QuestionITypeInfo - Method parameter names Pin
mpuerto26-Sep-05 15:55
mpuerto26-Sep-05 15:55 
AnswerRe: ITypeInfo - Method parameter names Pin
Lim Bio Liong27-Sep-05 0:24
Lim Bio Liong27-Sep-05 0:24 
GeneralRe: ITypeInfo - Method parameter names Pin
mpuerto27-Sep-05 11:38
mpuerto27-Sep-05 11:38 
QuestionMultithreaded COM Pin
tajbender25-Sep-05 9:52
tajbender25-Sep-05 9:52 
QuestionDesign Help Pin
dwh6324-Sep-05 18:51
dwh6324-Sep-05 18:51 
QuestionA Juicy COM Bug Pin
mango_lier24-Sep-05 13:57
mango_lier24-Sep-05 13:57 
GeneralRe: A Juicy COM Bug Pin
Jörgen Sigvardsson24-Sep-05 23:20
Jörgen Sigvardsson24-Sep-05 23:20 
mango_lier wrote:
I am curious to get some input from COM gurus why a call to QueryInterface() is adding an extra reference on the interface.

The COM rules says explicitly that a successful QueryInterface shall increase the reference count. This must be the case if you think about it. You are getting a reference to a new interface handle. It must be AddRef()'d because of situations like these:
IUnknown* pUnk = ...; // refcount is 1 after this line
IMyInterface* pItf;
pUnk->QueryInterface(__uuidof(IMyInterface), (void**)&pItf);
pUnk->Release();
pItf->MyMethod();
If QueryInterface didn't AddRef(), then the code above would be invalid.

The COM rules assures that client code does not need to be complex.

Good music: In my rosary[^]

-- modified at 5:20 Sunday 25th September, 2005
QuestionExample of Custom marshelling in COM Pin
Bhargava Alanka24-Sep-05 2:00
Bhargava Alanka24-Sep-05 2:00 
QuestionChat application b/w web application Pin
irshad ali23-Sep-05 21:27
irshad ali23-Sep-05 21:27 
QuestionIphelper API Pin
Mukhan23-Sep-05 10:26
Mukhan23-Sep-05 10:26 
QuestionCOM Help Pin
amitgh22-Sep-05 20:11
amitgh22-Sep-05 20:11 
AnswerRe: COM Help Pin
rwestgraham23-Sep-05 9:06
rwestgraham23-Sep-05 9:06 
GeneralRe: COM Help Pin
amitgh25-Sep-05 18:37
amitgh25-Sep-05 18:37 
GeneralRe: COM Help Pin
rwestgraham26-Sep-05 4:10
rwestgraham26-Sep-05 4:10 
QuestionInterface leak Pin
mango_lier22-Sep-05 11:45
mango_lier22-Sep-05 11:45 
AnswerRe: Interface leak Pin
Anonymous23-Sep-05 5:30
Anonymous23-Sep-05 5:30 
GeneralRe: Interface leak Pin
mango_lier23-Sep-05 6:58
mango_lier23-Sep-05 6:58 
Questionproblem with imnact.h Pin
rajeevktripathi22-Sep-05 1:40
rajeevktripathi22-Sep-05 1:40 
QuestionDebugging DLL Pin
Venkata Rama Subbarao21-Sep-05 22:49
Venkata Rama Subbarao21-Sep-05 22:49 
AnswerRe: Debugging DLL Pin
rwestgraham22-Sep-05 11:55
rwestgraham22-Sep-05 11:55 
GeneralRe: Debugging DLL Pin
Venkata Rama Subbarao28-Sep-05 0:51
Venkata Rama Subbarao28-Sep-05 0:51 
QuestionTo restore menu items of context menu in IE after adding custom items Pin
aaBad21-Sep-05 16:58
aaBad21-Sep-05 16:58 
QuestionOutlook Options Dialog Pin
Geralzibob21-Sep-05 12:30
Geralzibob21-Sep-05 12:30 
Questionexample project where in ROT is used Pin
Bhargava Alanka20-Sep-05 4:03
Bhargava Alanka20-Sep-05 4:03 

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.