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. ATL / WTL / STL
  4. Calling a COM DLL(built in visual studio 2008) from a COM DLL VC++ (visual studio 6.0)

Calling a COM DLL(built in visual studio 2008) from a COM DLL VC++ (visual studio 6.0)

Scheduled Pinned Locked Moved ATL / WTL / STL
tutorialcsharpc++visual-studiocom
10 Posts 3 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.
  • R Offline
    R Offline
    rana ray
    wrote on last edited by
    #1

    Hi All, I am facing problem while calling a COM DLL built in visual studio 2008 VC++ from a COM DLL built in visual studio 6.0,VC++. Can someone tell me how to call this DLL from VS6.0 dll? DO you have any practical example? Please share. regards, Vatsa

    S 1 Reply Last reply
    0
    • R rana ray

      Hi All, I am facing problem while calling a COM DLL built in visual studio 2008 VC++ from a COM DLL built in visual studio 6.0,VC++. Can someone tell me how to call this DLL from VS6.0 dll? DO you have any practical example? Please share. regards, Vatsa

      S Offline
      S Offline
      Stuart Dootson
      wrote on last edited by
      #2

      rana ray wrote:

      I am facing problem while calling a COM DLL built in visual studio 2008 VC++ from a COM DLL built in visual studio 6.0,VC++.

      What problem? Please share... Given how COM works, it doesn't matter if the COM DLL is built in VC++2008, VC++6 or VB6 - it gets called the same way whichever you use to build hte DLL or call it.

      Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

      R 1 Reply Last reply
      0
      • S Stuart Dootson

        rana ray wrote:

        I am facing problem while calling a COM DLL built in visual studio 2008 VC++ from a COM DLL built in visual studio 6.0,VC++.

        What problem? Please share... Given how COM works, it doesn't matter if the COM DLL is built in VC++2008, VC++6 or VB6 - it gets called the same way whichever you use to build hte DLL or call it.

        Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

        R Offline
        R Offline
        rana ray
        wrote on last edited by
        #3

        remember I am calling a dll from another dll. my vs 6.0 com dll is not identifying VS 2008 com dll's interface. I have included my vs2008's _i.c file and header file as well in my VS 6.0 com dll. Is there any other things which i need to do? sharing code is not possible for me as of now.

        S R 2 Replies Last reply
        0
        • R rana ray

          remember I am calling a dll from another dll. my vs 6.0 com dll is not identifying VS 2008 com dll's interface. I have included my vs2008's _i.c file and header file as well in my VS 6.0 com dll. Is there any other things which i need to do? sharing code is not possible for me as of now.

          S Offline
          S Offline
          Stuart Dootson
          wrote on last edited by
          #4

          rana ray wrote:

          remember I am calling a dll from another dll.

          Should make no difference.

          rana ray wrote:

          my vs 6.0 com dll is not identifying VS 2008 com dll's interface

          There are many reasons why that might happen. Have you checked you can access the VS2008 COM object from other clients?

          Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

          R 1 Reply Last reply
          0
          • S Stuart Dootson

            rana ray wrote:

            remember I am calling a dll from another dll.

            Should make no difference.

            rana ray wrote:

            my vs 6.0 com dll is not identifying VS 2008 com dll's interface

            There are many reasons why that might happen. Have you checked you can access the VS2008 COM object from other clients?

            Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

            R Offline
            R Offline
            rana ray
            wrote on last edited by
            #5

            yes it is accessible.

            S 1 Reply Last reply
            0
            • R rana ray

              yes it is accessible.

              S Offline
              S Offline
              Stuart Dootson
              wrote on last edited by
              #6

              OK, so when you call it from the VS2008 DLL, what function call fails (is it CoCreateInstance possibly) and what error status does it return?

              Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

              R 1 Reply Last reply
              0
              • R rana ray

                remember I am calling a dll from another dll. my vs 6.0 com dll is not identifying VS 2008 com dll's interface. I have included my vs2008's _i.c file and header file as well in my VS 6.0 com dll. Is there any other things which i need to do? sharing code is not possible for me as of now.

                R Offline
                R Offline
                Roger Stoltz
                wrote on last edited by
                #7

                First of all: are we talking about a compile time error or a runtime error?

                rana ray wrote:

                my vs 6.0 com dll is not identifying VS 2008 com dll's interface. I have included my vs2008's _i.c file and header file as well in my VS 6.0 com dll.

                What does this mean? How do you "import" the COM server you're trying to use? Are you using the #import statement? If you are: what does it look like?

                "It's supposed to be hard, otherwise anybody could do it!" - selfquote
                "High speed never compensates for wrong direction!" - unknown

                R 1 Reply Last reply
                0
                • S Stuart Dootson

                  OK, so when you call it from the VS2008 DLL, what function call fails (is it CoCreateInstance possibly) and what error status does it return?

                  Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

                  R Offline
                  R Offline
                  rana ray
                  wrote on last edited by
                  #8

                  It is throwing compilation errors. Not identifying Interface identifier.

                  S 1 Reply Last reply
                  0
                  • R Roger Stoltz

                    First of all: are we talking about a compile time error or a runtime error?

                    rana ray wrote:

                    my vs 6.0 com dll is not identifying VS 2008 com dll's interface. I have included my vs2008's _i.c file and header file as well in my VS 6.0 com dll.

                    What does this mean? How do you "import" the COM server you're trying to use? Are you using the #import statement? If you are: what does it look like?

                    "It's supposed to be hard, otherwise anybody could do it!" - selfquote
                    "High speed never compensates for wrong direction!" - unknown

                    R Offline
                    R Offline
                    rana ray
                    wrote on last edited by
                    #9

                    As there are 2com dll. I am using one com dll to import other. so in first one i have used cocreateinstance to instantiate my vs 2008 com dll.

                    1 Reply Last reply
                    0
                    • R rana ray

                      It is throwing compilation errors. Not identifying Interface identifier.

                      S Offline
                      S Offline
                      Stuart Dootson
                      wrote on last edited by
                      #10

                      Right, that's kind of an important detail. If I were you, I'd take note of what Roger said, and use #import[^] to get a reference to the VS80 DLLs. The code generated by MIDL has changed enough between VC6 and VS2008 that I wouldn't guarantee that VS2008 MIDL code will compile under VC6.

                      Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

                      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