Click here to Skip to main content
15,887,596 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Question on how interop files are generated. Pin
Jon_Boy21-Oct-08 6:17
Jon_Boy21-Oct-08 6:17 
Questionreally suck reading xmls Pin
ls780h21-Oct-08 3:10
ls780h21-Oct-08 3:10 
AnswerRe: really suck reading xmls Pin
Tom Deketelaere21-Oct-08 3:22
professionalTom Deketelaere21-Oct-08 3:22 
AnswerRe: really suck reading xmls Pin
Paddy Boyd21-Oct-08 3:24
Paddy Boyd21-Oct-08 3:24 
AnswerRe: really suck reading xmls Pin
Johan Hakkesteegt21-Oct-08 3:37
Johan Hakkesteegt21-Oct-08 3:37 
AnswerRe: really suck reading xmls Pin
Gideon Engelberth21-Oct-08 11:09
Gideon Engelberth21-Oct-08 11:09 
AnswerRe: really suck reading xmls Pin
ls780h25-Oct-08 1:00
ls780h25-Oct-08 1:00 
QuestionCrashes on application exit while hosting an VB ActiveX Control providing UI in a MFC application Pin
Martin081521-Oct-08 2:06
professionalMartin081521-Oct-08 2:06 
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
Dave Kreskowiak21-Oct-08 4:03
mveDave Kreskowiak21-Oct-08 4:03 
AnswerRe: Crashes on application exit while hosting an VB ActiveX Control providing UI in a MFC application Pin
Martin081522-Oct-08 4:47
professionalMartin081522-Oct-08 4:47 
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 
Questioncreate a folder on another computer on the network Pin
Dbase21-Oct-08 1:47
Dbase21-Oct-08 1:47 
GeneralRe: create a folder on another computer on the network - 3RD POST, MULTIPLE FORUMS Pin
Ashfield21-Oct-08 1:59
Ashfield21-Oct-08 1:59 
AnswerRe: create a folder on another computer on the network Pin
Jon_Boy21-Oct-08 3:29
Jon_Boy21-Oct-08 3:29 
Questionerror while trying to create an object for excel sheet Pin
preetpal21-Oct-08 1:31
preetpal21-Oct-08 1:31 
AnswerRe: error while trying to create an object for excel sheet Pin
Tom Deketelaere21-Oct-08 2:05
professionalTom Deketelaere21-Oct-08 2:05 
AnswerRe: error while trying to create an object for excel sheet Pin
Paddy Boyd21-Oct-08 3:25
Paddy Boyd21-Oct-08 3:25 
AnswerRe: error while trying to create an object for excel sheet Pin
Dave Kreskowiak21-Oct-08 4:00
mveDave Kreskowiak21-Oct-08 4:00 
Questionplz help.i want export datagridview data in excel sheet in vb.net winforms Pin
dilipmca0421-Oct-08 1:26
dilipmca0421-Oct-08 1:26 
AnswerRe: plz help.i want export datagridview data in excel sheet in vb.net winforms Pin
Dave Kreskowiak21-Oct-08 3:58
mveDave Kreskowiak21-Oct-08 3:58 
Questioncv or resume loader Pin
jhyn21-Oct-08 1:02
jhyn21-Oct-08 1:02 
GeneralRe: cv or resume loader Pin
Guffa21-Oct-08 1:28
Guffa21-Oct-08 1:28 
QuestionError occurs when using OdbcDataAdapter FILL command Pin
John Wadleigh20-Oct-08 22:58
John Wadleigh20-Oct-08 22:58 
AnswerRe: Error occurs when using OdbcDataAdapter FILL command Pin
Mycroft Holmes20-Oct-08 23:05
professionalMycroft Holmes20-Oct-08 23:05 
GeneralRe: Error occurs when using OdbcDataAdapter FILL command Pin
John Wadleigh20-Oct-08 23:31
John Wadleigh20-Oct-08 23:31 

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.