Click here to Skip to main content
15,913,159 members
Home / Discussions / COM
   

COM

 
GeneralRe: Reg: EnumConnectionPoints and IEnumConnectionPoints Pin
Jörgen Sigvardsson25-Jan-04 13:45
Jörgen Sigvardsson25-Jan-04 13:45 
GeneralStructured storage and compound files Pin
Omar Alvi20-Jan-04 2:04
Omar Alvi20-Jan-04 2:04 
GeneralRe: Structured storage and compound files Pin
Jörgen Sigvardsson25-Jan-04 13:49
Jörgen Sigvardsson25-Jan-04 13:49 
GeneralIProcessInitializer / COM+ Pin
vlvl19-Jan-04 4:58
vlvl19-Jan-04 4:58 
GeneralI need a good book... Pin
profoundwhispers19-Jan-04 3:17
profoundwhispers19-Jan-04 3:17 
GeneralRe: I need a good book... Pin
Jörgen Sigvardsson25-Jan-04 13:54
Jörgen Sigvardsson25-Jan-04 13:54 
GeneralRe: I need a good book... Pin
Prakash Nadar25-Jan-04 22:17
Prakash Nadar25-Jan-04 22:17 
GeneralRe: I need a good book... Pin
Jörgen Sigvardsson25-Jan-04 22:21
Jörgen Sigvardsson25-Jan-04 22:21 
GeneralScriptable ActiveX and javascript Pin
gialli19-Jan-04 2:04
gialli19-Jan-04 2:04 
GeneralRe: Scriptable ActiveX and javascript Pin
Anonymous30-Jan-04 10:54
Anonymous30-Jan-04 10:54 
GeneralInterdev and COM Pin
Davy Mitchell19-Jan-04 0:14
Davy Mitchell19-Jan-04 0:14 
GeneralWord Interop Pin
Guinness4Strength18-Jan-04 19:09
Guinness4Strength18-Jan-04 19:09 
GeneralSave a CArray into the persistence of a ActiveX Pin
ZeroCoolLP17-Jan-04 23:39
ZeroCoolLP17-Jan-04 23:39 
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 

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.