Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Aren't ActiveX controls universal?

Aren't ActiveX controls universal?

Scheduled Pinned Locked Moved C / C++ / MFC
c++comhelptesting
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sam C
    wrote on last edited by
    #1

    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

    S 1 Reply Last reply
    0
    • S Sam C

      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

      S Offline
      S Offline
      Sam C
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups