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. COM
  4. Multiple Inclusion

Multiple Inclusion

Scheduled Pinned Locked Moved COM
c++helphtmlcomtutorial
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.
  • G Offline
    G Offline
    gUrM33T
    wrote on last edited by
    #1

    I've a MTS/COM+ component (COMPONENT_1) that #imports ADO library. And, I have another MTS/COM+ component (COMPONENT_2) that #imports this component (i.e. COMPONENT_1). I need to use ADO objects in my second component (COMPONENT_2) too. If I use #import in my second component, I get lots of errors. If I do not, the MIDL compiler remains unable to recognize _Recordset data type. Or, lets say that I do not use ADO in my second component at all i.e. I use IDispatch instead of _Recordset pointers to receive recordsets. This solves the problem but gives birth to a new problem. ADO recordsets loose their current position i.e. it moves to the first record if type casted to IDispatch pointers. I dont know why. Can anyone please show me how to do it? I am using ATL with Visual C++ 6.0 SP5. Thanks Gurmeet


    BTW, can Google help me search my lost pajamas?

    My Articles: HTML Reader C++ Class Library, Numeric Edit Control

    G 1 Reply Last reply
    0
    • G gUrM33T

      I've a MTS/COM+ component (COMPONENT_1) that #imports ADO library. And, I have another MTS/COM+ component (COMPONENT_2) that #imports this component (i.e. COMPONENT_1). I need to use ADO objects in my second component (COMPONENT_2) too. If I use #import in my second component, I get lots of errors. If I do not, the MIDL compiler remains unable to recognize _Recordset data type. Or, lets say that I do not use ADO in my second component at all i.e. I use IDispatch instead of _Recordset pointers to receive recordsets. This solves the problem but gives birth to a new problem. ADO recordsets loose their current position i.e. it moves to the first record if type casted to IDispatch pointers. I dont know why. Can anyone please show me how to do it? I am using ATL with Visual C++ 6.0 SP5. Thanks Gurmeet


      BTW, can Google help me search my lost pajamas?

      My Articles: HTML Reader C++ Class Library, Numeric Edit Control

      G Offline
      G Offline
      gUrM33T
      wrote on last edited by
      #2

      Any COM expert here? Please help! Gurmeet


      BTW, can Google help me search my lost pajamas?

      My Articles: HTML Reader C++ Class Library, Numeric Edit Control

      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