I've been making a program by MDI in VS 2005(MFC)
And also I'm connecting with server by COM.
I initiate at the part of connecting with COM Sever by CoInitializeEx(NULL,COINIT_MULTITHREADED) not the InitInstance().
And I intiate when the server logging.
I arrange OCX as same as the location of Project Directory and registered
by regsvr32.
And by connecting with the Server, I'll show the message count to the chart (Teechart ActiveX control ver.8 ) that sent a message on Child Window.
The problem is when running the Child Window, there is an error on
950 Line of the Occcont.cpp.
As a result of checking the point of being error by making a breakpoint,
the error is the red mark below the souce.
Well after I deleted this ActiveX control on the resouce and a part of DoDataExchange which connecting with controling, and compiled then it's worked well not any problem.
Is there any problem between doing CoInitializeEx when connecting with a server by COM and ActiveX control?
This is the content of Assertion.
--->
Debug Assertion failed!
File : f:rtm\vctools\vc7libs\ship\atlmfc\src\mfc\occcont.cpp
line : 950
<---
HWND GETSTATISTICSFV()
{
if(pSTATISTICSFrame)
{
pSTATISTICSFrame->ActivateFrame();
pSTATISTICSFrame->ShowWindow(SW_SHOWNORMAL);
return pSTATISTICSFrame->GetSafeHwnd();
}
CMultiDocTemplate* pDocTemplate;
pDocTemplate = new CMultiDocTemplate(IDR_MAINFRAME,
RUNTIME_CLASS(CuiDoc), RUNTIME_CLASS(CChildFrame),
RUNTIME_CLASS(Cstatistics));
AfxGetApp()->AddDocTemplate((CDocTemplate*)pDocTemplate);
pDocTemplate->OpenDocumentFile(NULL);
POSITION ps = pDocTemplate->GetFirstDocPosition();
CDocument* pdoc = pDocTemplate->GetNextDoc( ps );
ps = pdoc->GetFirstViewPosition();
pSTATISTICSFrame = pdoc->GetNextView( ps )->GetParentFrame();
return pSTATISTICSFrame->GetSafeHwnd();
}
CoInitializeEx and TeeChart Problem in COM Environment.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi seanlee76,
It's very difficult for us guessing where the problem might be without being able to reproduce it. Would you be so kind to send us a simple project we can run "as-is" to reproduce and debug the problem here?
You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
Thanks in advance.
It's very difficult for us guessing where the problem might be without being able to reproduce it. Would you be so kind to send us a simple project we can run "as-is" to reproduce and debug the problem here?
You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |