Click here to Skip to main content
15,887,485 members
Home / Discussions / COM
   

COM

 
GeneralRe: How to regsvr32 ***.ocx successful? Pin
huangdingjun27-Oct-08 1:26
huangdingjun27-Oct-08 1:26 
GeneralRe: How to regsvr32 ***.ocx successful? Pin
Rajasekharan Vengalil4-Nov-08 9:29
Rajasekharan Vengalil4-Nov-08 9:29 
QuestionVB 6, ASP and COM Pin
indian14322-Oct-08 23:31
indian14322-Oct-08 23:31 
QuestionSystem.OutOfMemoryException: Retrieving the COM class factory for component with CLSID {29131539-2EED-1069-BF5D-00DD011186B7} failed due to the following error: 8007000e. Pin
blakshmi21-Oct-08 22:44
blakshmi21-Oct-08 22:44 
AnswerRe: System.OutOfMemoryException: Retrieving the COM class factory for component with CLSID {29131539-2EED-1069-BF5D-00DD011186B7} failed due to the following error: 8007000e. Pin
User 21559724-Oct-08 0:16
User 21559724-Oct-08 0:16 
QuestionAutoformat an Excel file and import it into Sql Sever 2000 Pin
Nitin Raj21-Oct-08 22:03
Nitin Raj21-Oct-08 22:03 
QuestionMAPI hooks Pin
Dr. Kelwin21-Oct-08 14:55
Dr. Kelwin21-Oct-08 14:55 
QuestionCrashes on application exit while hosting an VB ActiveX Control providing UI in a MFC application Pin
Martin081521-Oct-08 2:07
professionalMartin081521-Oct-08 2:07 
Hello,

perhaps somebody can help me to find the reason for the crashes I have.

I have a MFC Application with MFC extension DLLs.
One of the dialogs is a window with a CPropertySheet.
One CPropertyPage is a host for ActiveX Controls providing extending UI.
This CPropertyPage has a CWnd member to host the ActiveX Controls dynamically created runtime using the CWnd::CreateControl method.

I have a VB ActiveX Control providing needed extending UI.
It can be loaded and used without problems.
The only problem occurs, when the application exits:
1. The CPropertySheet is destroyed ... the CPropertyPage is destroyed, ...
... which releases its previously queried interfaces,
... sends a WM_DESTROY to the CWnd hosting the ActiveX Control and
... deletes/frees the CWnd
2. Somewhere at the end just before invoking "exit" open "OLE" connections/loaded "OLE" libraries are terminated by Microsoft internal code. I saw that the ActiveX OCX module was active until this moment.
3. In the "exit" invocation the MFC application crashes from within the VB ActiveX Control. The VB ActiveX Control does not execute its UserControl_Terminate handler, so it seems, that there happens an irregular deletion of the VB ActiveX Control.

This crash happens currently only in the debug version of our application. But adding CommonControls to the VB ActiveX Control UI causes a crash even in the release version of this MFC application.

Using a MFC ActiveX Control providing some UI, too, no problems occur.

The only difference seen while releasing the last reference to the previously queried interface are that ...
... the release on the interface of VB ActiveX Control returns 4 still valid references,
... while the release on the interface of the MFC ActiveX Control returns only 3 still valid references.

Thus I suspect, that at application end there is still a last reference valid, not released, which causes a crash after the OCX is unloaded from Microsoft internal code cleaning up before the real application exit.
Something in the VB ActiveX Control wants still to work (like executing UserControl_Terminate), but the OCX is already unloaded.

But ... where and how can I find this last reference?

Debugging through the MFC code hosting the ActiveX Control didn't help really?

Has somebody here experienced a similar problem? Or can somebody help?

Thanks in advance,

Martin
AnswerRe: Crashes on application exit while hosting an VB ActiveX Control providing UI in a MFC application Pin
Ernest Laurentin21-Oct-08 7:55
Ernest Laurentin21-Oct-08 7:55 
GeneralRe: Crashes on application exit while hosting an VB ActiveX Control providing UI in a MFC application Pin
Martin081522-Oct-08 0:59
professionalMartin081522-Oct-08 0:59 
AnswerRe: Crashes on application exit while hosting an VB ActiveX Control providing UI in a MFC application Pin
Martin081522-Oct-08 4:46
professionalMartin081522-Oct-08 4:46 
GeneralSolved - Re: Crashes on application exit while hosting an VB ActiveX Control providing UI in a MFC application Pin
Martin081528-Oct-08 23:07
professionalMartin081528-Oct-08 23:07 
QuestionRelease COM interfaces Pin
john563220-Oct-08 20:41
john563220-Oct-08 20:41 
AnswerRe: Release COM interfaces Pin
Roger Stoltz20-Oct-08 21:18
Roger Stoltz20-Oct-08 21:18 
AnswerRe: Release COM interfaces [modified] Pin
john563220-Oct-08 22:34
john563220-Oct-08 22:34 
GeneralRe: Release COM interfaces Pin
Roger Stoltz21-Oct-08 3:58
Roger Stoltz21-Oct-08 3:58 
AnswerRe: Release COM interfaces Pin
Member 459552813-Nov-08 20:30
Member 459552813-Nov-08 20:30 
Questionwhat is .pfx file Pin
wasimsharp19-Oct-08 23:47
wasimsharp19-Oct-08 23:47 
QuestionUsing MsComm for recieving data Pin
tauras8118-Oct-08 0:08
tauras8118-Oct-08 0:08 
JokeRe: Using MsComm for recieving data Pin
CPallini18-Oct-08 1:36
mveCPallini18-Oct-08 1:36 
AnswerRe: Using MsComm for recieving data Pin
Mike Dimmick19-Oct-08 0:38
Mike Dimmick19-Oct-08 0:38 
Question[Message Deleted] Pin
_nnemo_16-Oct-08 3:18
_nnemo_16-Oct-08 3:18 
AnswerRe: IWebBrowser2 - object deletion Pin
Mike Dimmick19-Oct-08 0:40
Mike Dimmick19-Oct-08 0:40 
QuestionHow to execute methods from ATL/COM base class Pin
Doug Knudson15-Oct-08 9:34
Doug Knudson15-Oct-08 9:34 
AnswerRe: How to execute methods from ATL/COM base class Pin
prasad_som16-Oct-08 4:59
prasad_som16-Oct-08 4:59 

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.