Aren't ActiveX controls universal?
-
I'm having a heck of a time with this one guys so any points in the right direction or helpful tips will be greatly appreciated. I have used this 3rd party control a ton of times in Visual Basic (no flames :-) ), it is written using VC++ and ATL. It compiles and builds fine, however, I get this error in occsite.cpp when running the application in debug mode "Unhandled Exception", and it breaks here:
DWORD COleControlSite::ConnectSink(REFIID iid, LPUNKNOWN punkSink)
{
ASSERT(m_pObject != NULL);LPCONNECTIONPOINTCONTAINER pConnPtCont; if ((m\_pObject != NULL) &&
BREAK<< -> SUCCEEDED(m_pObject->QueryInterface(IID_IConnectionPointContainer,
(LPVOID*)&pConnPtCont)))
{
ASSERT(pConnPtCont != NULL);
LPCONNECTIONPOINT pConnPt = NULL;
DWORD dwCookie = 0;if (SUCCEEDED(pConnPtCont->FindConnectionPoint(iid, &pConnPt))) { ASSERT(pConnPt != NULL); pConnPt->Advise(punkSink, &dwCookie); pConnPt->Release(); } pConnPtCont->Release(); return dwCookie; }
Here are the steps I have taken to get to this point. Added the control to a Dialog based application. Clicked on project->Add to project->Components and control. I click on the control in the Registered ActiveX controls (Oh, I used MFC and classwizard with dynamic link to MFC, and ActiveX support checked, and tried it with Automation support) select the control. Use the toolbox drag the control to a dialog, then use class wizard to assign it to a variable of type Control -> Class Name. VC generated 4 wrapper classes, and then I build the app, no errors no problems, but when I hit F5 I get the error message above. My assumption that all ActiveX controls, built on the COM architecture, are supposed to be interchangeable between enviornments. Is it possible this is not the case? Please post any help you can here, or feel free to email me, but I'm stumped on this one. I may have to use the C++ wrapper for the control, but shouldn't this step work?!?! Thanks in Advance for any help! Sam C ---- Systems Manager Hospitality Marketing Associates
-
I'm having a heck of a time with this one guys so any points in the right direction or helpful tips will be greatly appreciated. I have used this 3rd party control a ton of times in Visual Basic (no flames :-) ), it is written using VC++ and ATL. It compiles and builds fine, however, I get this error in occsite.cpp when running the application in debug mode "Unhandled Exception", and it breaks here:
DWORD COleControlSite::ConnectSink(REFIID iid, LPUNKNOWN punkSink)
{
ASSERT(m_pObject != NULL);LPCONNECTIONPOINTCONTAINER pConnPtCont; if ((m\_pObject != NULL) &&
BREAK<< -> SUCCEEDED(m_pObject->QueryInterface(IID_IConnectionPointContainer,
(LPVOID*)&pConnPtCont)))
{
ASSERT(pConnPtCont != NULL);
LPCONNECTIONPOINT pConnPt = NULL;
DWORD dwCookie = 0;if (SUCCEEDED(pConnPtCont->FindConnectionPoint(iid, &pConnPt))) { ASSERT(pConnPt != NULL); pConnPt->Advise(punkSink, &dwCookie); pConnPt->Release(); } pConnPtCont->Release(); return dwCookie; }
Here are the steps I have taken to get to this point. Added the control to a Dialog based application. Clicked on project->Add to project->Components and control. I click on the control in the Registered ActiveX controls (Oh, I used MFC and classwizard with dynamic link to MFC, and ActiveX support checked, and tried it with Automation support) select the control. Use the toolbox drag the control to a dialog, then use class wizard to assign it to a variable of type Control -> Class Name. VC generated 4 wrapper classes, and then I build the app, no errors no problems, but when I hit F5 I get the error message above. My assumption that all ActiveX controls, built on the COM architecture, are supposed to be interchangeable between enviornments. Is it possible this is not the case? Please post any help you can here, or feel free to email me, but I'm stumped on this one. I may have to use the C++ wrapper for the control, but shouldn't this step work?!?! Thanks in Advance for any help! Sam C ---- Systems Manager Hospitality Marketing Associates
The above shouldn't say break, should of said ASSERTION in big bold letters :-) If anyone even has a guess to why this is happening or can explain to me why ActiveX controls aren't universal please do. Thanks. Sam C ---- Systems Manager Hospitality Marketing Associates