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. Other Discussions
  3. IT & Infrastructure
  4. Csharp Client, C++ COM interface

Csharp Client, C++ COM interface

Scheduled Pinned Locked Moved IT & Infrastructure
csharphelpquestionc++com
6 Posts 4 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.
  • P Offline
    P Offline
    picazo
    wrote on last edited by
    #1

    Hi, not sure if this is the correct place to post this question... I have a C++ COM interface method: SomeMethod(BSTR inString, IUnknown *inCommand, IUnknown **outResult) { ... IXMLDOMElementPtr inCommandPtr = inCommand; ... } I am trying to call it from a c# client app, but I am not sure what I am supposed to pass in for the second param (inCommand). I tried adding a reference to microsoft.XML v6.0 COM. Then doing the following: ... using MSXML2; ... public void MethodWrapper( string command ) { string dummy = "test string"; MSXML2.IXMLDOMDocument2 inCommand = new MSXML2.DOMDocumentClass(); inCommand.loadXML( command ); _theCOMObj.SomeMethod(dummy, inCommand.documentElement); } ... I am getting the following error: It is an error to mix objects from different versions of MSXML. Does anyone have any clue how to fix this? Any suggestion would be greatly appreciated.

    ----------------- Genaro

    realJSOPR 1 Reply Last reply
    0
    • P picazo

      Hi, not sure if this is the correct place to post this question... I have a C++ COM interface method: SomeMethod(BSTR inString, IUnknown *inCommand, IUnknown **outResult) { ... IXMLDOMElementPtr inCommandPtr = inCommand; ... } I am trying to call it from a c# client app, but I am not sure what I am supposed to pass in for the second param (inCommand). I tried adding a reference to microsoft.XML v6.0 COM. Then doing the following: ... using MSXML2; ... public void MethodWrapper( string command ) { string dummy = "test string"; MSXML2.IXMLDOMDocument2 inCommand = new MSXML2.DOMDocumentClass(); inCommand.loadXML( command ); _theCOMObj.SomeMethod(dummy, inCommand.documentElement); } ... I am getting the following error: It is an error to mix objects from different versions of MSXML. Does anyone have any clue how to fix this? Any suggestion would be greatly appreciated.

      ----------------- Genaro

      realJSOPR Offline
      realJSOPR Offline
      realJSOP
      wrote on last edited by
      #2

      Well, I'd post the question in the correct forum for starters...

      "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
      -----
      "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

      P 1 Reply Last reply
      0
      • realJSOPR realJSOP

        Well, I'd post the question in the correct forum for starters...

        "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
        -----
        "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

        P Offline
        P Offline
        picazo
        wrote on last edited by
        #3

        Would that be the C# forum or the C++? Thanks,

        ----------------- Genaro

        realJSOPR 1 Reply Last reply
        0
        • P picazo

          Would that be the C# forum or the C++? Thanks,

          ----------------- Genaro

          realJSOPR Offline
          realJSOPR Offline
          realJSOP
          wrote on last edited by
          #4

          You're cannot possibly be serious...

          "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
          -----
          "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

          K 1 Reply Last reply
          0
          • realJSOPR realJSOP

            You're cannot possibly be serious...

            "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
            -----
            "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

            K Offline
            K Offline
            Kevin McFarlane
            wrote on last edited by
            #5

            I would say that "General" is a reasonable place to post for this question.

            Kevin

            P 1 Reply Last reply
            0
            • K Kevin McFarlane

              I would say that "General" is a reasonable place to post for this question.

              Kevin

              P Offline
              P Offline
              Paul Conrad
              wrote on last edited by
              #6

              Kevin McFarlane wrote:

              I would say that "General" is a reasonable place to post for this question.

              Same here. Maybe Chris should call it General Programming Discussion. It would cover this post and others such as people asking what programming language they should learn, etc...


              Some people have a memory and an attention span, you should try them out one day. - Jeremy Falcon

              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