Click here to Skip to main content
15,890,506 members
Home / Discussions / COM
   

COM

 
GeneralRe: Save a CArray into the persistence of a ActiveX Pin
Mike Dimmick19-Jan-04 0:25
Mike Dimmick19-Jan-04 0:25 
GeneralRe: Save a CArray into the persistence of a ActiveX Pin
ZeroCoolLP19-Jan-04 0:34
ZeroCoolLP19-Jan-04 0:34 
QuestionPossible to dvlp COM/ATL C++ code in VS.NET? Pin
michael thomas17-Jan-04 11:28
michael thomas17-Jan-04 11:28 
AnswerRe: Possible to dvlp COM/ATL C++ code in VS.NET? Pin
Amit Dey24-Jan-04 11:47
Amit Dey24-Jan-04 11:47 
Generalproblem with __uuidof Pin
emmatty17-Jan-04 0:04
emmatty17-Jan-04 0:04 
GeneralRe: problem with __uuidof Pin
Abhishek Srivastava18-Jan-04 17:17
Abhishek Srivastava18-Jan-04 17:17 
GeneralRe: problem with __uuidof Pin
Anonymous30-Jan-04 11:09
Anonymous30-Jan-04 11:09 
GeneralRelease in thread created by timer Pin
Steve Schaneville15-Jan-04 17:39
professionalSteve Schaneville15-Jan-04 17:39 
Got a problem, exhausted all of my ideas:

I have an MFC / ATL-com-server project. Upon final release, I want the COM object to wait for a timer to fire one last time and run it's thread to completion before unloading itself. Here are some attempts:

1) AddRef() in the com object and then once the timer thread has fired it's last time, Release() from that thread. This causes a crash in the main window of the app in CWnd::DestrowWindow function with this code:
		if (pWnd != NULL)
		{
			// Should have been detached by OnNcDestroy
#ifdef _DEBUG
			ASSERT(pMap->LookupPermanent(hWndOrig) == NULL);
#endif
		}


2) In the CSSLogCOM::InternalRelease() function (which I've overridden), wait for a flag to be set when the timer thread fires and completes with while(bWait) Sleep(1000);. This doesn't work because the timer won't fire once we're in this function! ???

3) I would try to post a WM_QUIT message to the main window, but the ATL server can host many copies of the same COM object in a single instance and if one of them posts the quit message, other running instances will be stopped early.

Anyone have any idea how I can "delay" the final release of a COM object from closing the ATL server until my worker thread has completed?

Thanks
~Steve
GeneralRe: Release in thread created by timer Pin
Jörgen Sigvardsson15-Jan-04 21:58
Jörgen Sigvardsson15-Jan-04 21:58 
GeneralRe: Release in thread created by timer Pin
Steve Schaneville16-Jan-04 12:20
professionalSteve Schaneville16-Jan-04 12:20 
QuestionBig difference between VB new operator and COM CoCreateInstance? Pin
Brigsoft15-Jan-04 9:54
Brigsoft15-Jan-04 9:54 
AnswerRe: Big difference between VB new operator and COM CoCreateInstance? Pin
Anonymous30-Jan-04 11:18
Anonymous30-Jan-04 11:18 
QuestionHow to fill the fields of IE's web page from within VB or C++ ? Pin
John Thomas15-Jan-04 6:10
John Thomas15-Jan-04 6:10 
AnswerRe: How to fill the fields of IE's web page from within VB or C++ ? Pin
Amit Dey24-Jan-04 11:51
Amit Dey24-Jan-04 11:51 
GeneralProblems with out of process server (COM) Pin
Anonymous15-Jan-04 0:26
Anonymous15-Jan-04 0:26 
GeneralRe: Problems with out of process server (COM) Pin
Mike Dimmick15-Jan-04 2:34
Mike Dimmick15-Jan-04 2:34 
GeneralRe: Problems with out of process server (COM) Pin
Omar Alvi15-Jan-04 8:13
Omar Alvi15-Jan-04 8:13 
GeneralRe: Problems with out of process server (COM) Pin
Anonymous30-Jan-04 11:26
Anonymous30-Jan-04 11:26 
GeneralInside Ole Kraig BrockSchmidt, samples needed Pin
safee ullah13-Jan-04 23:35
safee ullah13-Jan-04 23:35 
GeneralWord Component Object Model Pin
Anonymous13-Jan-04 1:51
Anonymous13-Jan-04 1:51 
GeneralRe: Word Component Object Model Pin
Michael P Butler13-Jan-04 2:10
Michael P Butler13-Jan-04 2:10 
GeneralRe: Word Component Object Model Pin
Anonymous13-Jan-04 3:39
Anonymous13-Jan-04 3:39 
QuestionHow to get IStream on ordinary file ? Pin
vipsy12-Jan-04 22:11
vipsy12-Jan-04 22:11 
AnswerRe: How to get IStream on ordinary file ? Pin
Jörgen Sigvardsson13-Jan-04 9:39
Jörgen Sigvardsson13-Jan-04 9:39 
GeneralRe: How to get IStream on ordinary file ? Pin
vipsy13-Jan-04 17:58
vipsy13-Jan-04 17:58 

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.