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. XML / XSL
  4. XML DOM in ATL

XML DOM in ATL

Scheduled Pinned Locked Moved XML / XSL
c++htmlxmlhelptutorial
6 Posts 5 Posters 3 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.
  • I Offline
    I Offline
    i 5
    wrote on last edited by
    #1

    While i using an interface of DOM (IXMLDOMNode *) as an parameter of an interface like that : [helpstring("method Load")] HRESULT Load([in]IXMLDOMNode * piXMLNode); there is an midl error : midl\oleaut32.dll : error MIDL2020 : error generating type library : AddImplType failed : IXMLDOMDocument How it caused and how to handle it? thank. Scratch

    C D 2 Replies Last reply
    0
    • I i 5

      While i using an interface of DOM (IXMLDOMNode *) as an parameter of an interface like that : [helpstring("method Load")] HRESULT Load([in]IXMLDOMNode * piXMLNode); there is an midl error : midl\oleaut32.dll : error MIDL2020 : error generating type library : AddImplType failed : IXMLDOMDocument How it caused and how to handle it? thank. Scratch

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      You can only pass a limited number of parameters on a COM interface, and the only way to pass COM objects is as an IUnkown * ( and maybe IDispatch *, I forget ). Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002 Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002

      L J 2 Replies Last reply
      0
      • C Christian Graus

        You can only pass a limited number of parameters on a COM interface, and the only way to pass COM objects is as an IUnkown * ( and maybe IDispatch *, I forget ). Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002 Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002

        L Offline
        L Offline
        Lizp
        wrote on last edited by
        #3

        Ok,that's it ,thanks. Scratch

        1 Reply Last reply
        0
        • I i 5

          While i using an interface of DOM (IXMLDOMNode *) as an parameter of an interface like that : [helpstring("method Load")] HRESULT Load([in]IXMLDOMNode * piXMLNode); there is an midl error : midl\oleaut32.dll : error MIDL2020 : error generating type library : AddImplType failed : IXMLDOMDocument How it caused and how to handle it? thank. Scratch

          D Offline
          D Offline
          Daniel Turini
          wrote on last edited by
          #4

          If you are defining a custom interface or dual interfaces, gorget what Christian said to you: you CAN do it. The only problem will appear when you use a [in, out] parameter, and then, the only problem will be that scripting clients won't be able to call your method (you'll get a "type mismatch" from VBScript) You need to put a importlib in your IDL file, under the library section: For importing ADO, you could do this: importlib("c:\program files\common files\system\ado\msado26.tlb"); change the path to the MSXML parser type library on your development machine; PS: As much as I hate VB, it can be a great tool for protoryping COM interfaces and quickly writing a IDL. When you don't know how to define a COM interface, create a COM DLL in VB with the desired interface and look the IDL on OLEVIEW I see dumb people

          I 1 Reply Last reply
          0
          • D Daniel Turini

            If you are defining a custom interface or dual interfaces, gorget what Christian said to you: you CAN do it. The only problem will appear when you use a [in, out] parameter, and then, the only problem will be that scripting clients won't be able to call your method (you'll get a "type mismatch" from VBScript) You need to put a importlib in your IDL file, under the library section: For importing ADO, you could do this: importlib("c:\program files\common files\system\ado\msado26.tlb"); change the path to the MSXML parser type library on your development machine; PS: As much as I hate VB, it can be a great tool for protoryping COM interfaces and quickly writing a IDL. When you don't know how to define a COM interface, create a COM DLL in VB with the desired interface and look the IDL on OLEVIEW I see dumb people

            I Offline
            I Offline
            i 5
            wrote on last edited by
            #5

            Another question ... When the midl process my .idl file ,it arbitrarily import the default msxml sdk and use the old version objects. if use one of these directors #include "C:\Program Files\MSXML 4.0\inc\msxml2.h" #include "C:\Program Files\MSXML 4.0\inc\msxml2.idl" #import "C:\winnt\system32\msxml4.dll" no_namespace Certain Interfaces are redefine . My wonder how to got rid of the midl's default msxml library and use my own sdk library? Scratch

            1 Reply Last reply
            0
            • C Christian Graus

              You can only pass a limited number of parameters on a COM interface, and the only way to pass COM objects is as an IUnkown * ( and maybe IDispatch *, I forget ). Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002 Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002

              J Offline
              J Offline
              Jorgen Sigvardsson
              wrote on last edited by
              #6

              Christian Graus wrote: You can only pass a limited number of parameters on a COM interface, and the only way to pass COM objects is as an IUnkown * ( and maybe IDispatch *, I forget ). Actually, you can pass anything as long as the midl-compiler knows about it. I.e. anything declared within the same idl file or imported from another idl-file. -- This space for rent.

              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