Click here to Skip to main content
16,005,121 members
Home / Discussions / COM
   

COM

 
GeneralRe: Dynamically switching between DLLs Pin
rwestgraham28-Sep-05 19:08
rwestgraham28-Sep-05 19:08 
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 
There is an article on codeguru (http://www.codeguru.com/Cpp/misc/misc/article.php/c6093/[^]) about using active scripting with MFC or ATL/WTL application. The code library instruments connection points between VBScript and host application so one can call C/C++ functions from VBScript and share the variables between the two. The implementation is reasonable except one issue, It suffer from an “Interface Leak”. One can see the leak running the sample program with the article in debug mode.

It seems the AddRef()/Release() are not balanced in the code. I was curios to see where the bug was. Tracing the interface code, it seems that “QueryInterface()” is seemingly adding implicit reference on the interface.

I fixed the problem by inserting an extra Release() on pIDisp on line 308 in file “ScriptHost.cpp” after the AddRef(). It seemingly solves the problem with no more interface leaks.

The fix above is for function residing in the application, the same fix on couple of lines above solves the shared variable issue too.

I am curious to get some input from COM gurus why a call to QueryInterface() is adding an extra reference on the interface.
GeneralRe: A Juicy COM Bug Pin
Jörgen Sigvardsson24-Sep-05 23:20
Jörgen Sigvardsson24-Sep-05 23:20 
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 

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.