Click here to Skip to main content
15,886,676 members
Home / Discussions / COM
   

COM

 
AnswerRe: Help~~~ Pin
Jörgen Sigvardsson5-Aug-06 13:28
Jörgen Sigvardsson5-Aug-06 13:28 
GeneralRe: Help~~~ Pin
HuizhiZhao6-Aug-06 15:35
HuizhiZhao6-Aug-06 15:35 
Questionnewbee trying to create GUID programetically Pin
harsha_12343-Aug-06 21:17
harsha_12343-Aug-06 21:17 
AnswerRe: newbee trying to create GUID programetically [modified] Pin
Jonathan [Darka]3-Aug-06 21:39
professionalJonathan [Darka]3-Aug-06 21:39 
Questionhow can i handling IHTMLElement event,about reuseing webbrowser Pin
O_O_O3-Aug-06 15:42
O_O_O3-Aug-06 15:42 
QuestionProblem releasing an object from memory in IE Pin
gvsunil2-Aug-06 23:31
gvsunil2-Aug-06 23:31 
AnswerRe: Problem releasing an object from memory in IE Pin
Mike Dimmick6-Aug-06 23:29
Mike Dimmick6-Aug-06 23:29 
Questionquetion regarding ocx object unloading (Addref, Release) Pin
darbien siamak2-Aug-06 9:39
darbien siamak2-Aug-06 9:39 
I have created an Activex object and registered it. I can instantiate the object in VBScript -CreateObject works fine without any problem.

However, I have noticed that if the browser (IE in this case) is not closed the object OCX file cannot be deleted and unregistered. As far as VBScript it is sufficient to set the object to "nothing" to release it, so I think there's something I need to add in the Activex code.

In the Activex object I'm also using the IObjectSafety interface the AddRef() and Release() function are added as bellow

------------------------ CODE STARTS HERE
ULONG FAR EXPORT CMyCtrl::XObjSafe::AddRef()
{
METHOD_PROLOGUE(CMyCtrl, ObjSafe)
return pThis->ExternalAddRef();
}
ULONG FAR EXPORT CMyCtrl::XObjSafe::Release()
{
METHOD_PROLOGUE(CMyCtrl, ObjSafe)
return pThis->ExternalRelease();
}
------------------------ CODE ENDS

I have a naive question: do I need to add something in the Release() function to properly delete the object? and where can I find an example of how this is done? From what I've read so far I know there is a reference count I need to maintain and check at Release() but I'm confused on where do I add this.

Any suggestions is welcome!
AnswerRe: quetion regarding ocx object unloading (Addref, Release) Pin
Mike Dimmick14-Aug-06 16:35
Mike Dimmick14-Aug-06 16:35 
QuestionAutofilter Method of Excel worksheet range? Pin
vaibhav24122-Aug-06 6:38
vaibhav24122-Aug-06 6:38 
QuestionPING other Systems Pin
abhiramsss31-Jul-06 2:09
abhiramsss31-Jul-06 2:09 
AnswerRe: PING other Systems Pin
QuickDeveloper1-Aug-06 18:25
QuickDeveloper1-Aug-06 18:25 
QuestionHow to open DLL files to read the code Pin
Harshad Pednekar31-Jul-06 1:18
Harshad Pednekar31-Jul-06 1:18 
AnswerRe: How to open DLL files to read the code Pin
Prakash Nadar1-Aug-06 1:14
Prakash Nadar1-Aug-06 1:14 
QuestionSinks Pin
DanB198328-Jul-06 0:08
DanB198328-Jul-06 0:08 
AnswerRe: Sinks Pin
Stephen Hewitt28-Jul-06 1:17
Stephen Hewitt28-Jul-06 1:17 
AnswerRe: Sinks Pin
Kiran Pinjala31-Jul-06 21:26
Kiran Pinjala31-Jul-06 21:26 
QuestionI want to load COM objects in a C# application Pin
Steve Messer27-Jul-06 17:20
Steve Messer27-Jul-06 17:20 
AnswerRe: I want to load COM objects in a C# application Pin
sudeesh8-Aug-06 18:11
sudeesh8-Aug-06 18:11 
GeneralRe: I want to load COM objects in a C# application Pin
Steve Messer8-Aug-06 18:38
Steve Messer8-Aug-06 18:38 
QuestionAbout IE 7 Tabs Pin
JaydeepB26-Jul-06 21:46
JaydeepB26-Jul-06 21:46 
AnswerRe: About IE 7 Tabs Pin
JaydeepB27-Jul-06 21:25
JaydeepB27-Jul-06 21:25 
QuestionSpy Com Pin
blue_rabbit26-Jul-06 21:02
blue_rabbit26-Jul-06 21:02 
AnswerRe: Spy Com Pin
Mike Dimmick28-Jul-06 3:54
Mike Dimmick28-Jul-06 3:54 
GeneralRe: Spy Com Pin
blue_rabbit1-Aug-06 21:49
blue_rabbit1-Aug-06 21:49 

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.