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#
  4. COM Interoperability

COM Interoperability

Scheduled Pinned Locked Moved C#
helpcsharpc++comtutorial
7 Posts 2 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.
  • K Offline
    K Offline
    KrunalC
    wrote on last edited by
    #1

    I am establishing the COM Interoperability where I'm exposing the functionality in my .net component to client developed in either vb 6.0 or vc++. I don't have any issue regarding how to implement the COM Interoperabiliy. My problem is, to make my call from client to .net component successful, I have to put my client application also in the same path where my .net component is. If I put my client application in a path other than my .net component path then call is not successful as it fails to find out some DLL dependancy. Can someone tell me how I can run my client application independent from the .net component path. I hope I'm clear with my question. Thanks & Regards,

    C 1 Reply Last reply
    0
    • K KrunalC

      I am establishing the COM Interoperability where I'm exposing the functionality in my .net component to client developed in either vb 6.0 or vc++. I don't have any issue regarding how to implement the COM Interoperabiliy. My problem is, to make my call from client to .net component successful, I have to put my client application also in the same path where my .net component is. If I put my client application in a path other than my .net component path then call is not successful as it fails to find out some DLL dependancy. Can someone tell me how I can run my client application independent from the .net component path. I hope I'm clear with my question. Thanks & Regards,

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

      If your DLL is a COM dll, then it should register as such, and run from where-ever you like. Are you calling it from C++ or VB6 ? What is the dll it cannot find ?

      Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

      K 1 Reply Last reply
      0
      • C Christian Graus

        If your DLL is a COM dll, then it should register as such, and run from where-ever you like. Are you calling it from C++ or VB6 ? What is the dll it cannot find ?

        Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

        K Offline
        K Offline
        KrunalC
        wrote on last edited by
        #3

        My dlls are not COM dll so I'm not registering them with registry. I have a .net component (dll) which can be accessed through COM interop by VB or VC++ client. my .net component is using some dlls so at the runtime (i.e. during client call these dlls could not be found)

        C 1 Reply Last reply
        0
        • K KrunalC

          My dlls are not COM dll so I'm not registering them with registry. I have a .net component (dll) which can be accessed through COM interop by VB or VC++ client. my .net component is using some dlls so at the runtime (i.e. during client call these dlls could not be found)

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

          OK, well, it doesn't sound to me like you're using COM interop at all. Where does COM come into it, if you're not writing COM dlls ?

          Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

          K 1 Reply Last reply
          0
          • C Christian Graus

            OK, well, it doesn't sound to me like you're using COM interop at all. Where does COM come into it, if you're not writing COM dlls ?

            Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

            K Offline
            K Offline
            KrunalC
            wrote on last edited by
            #5

            I think we are not talking on the same line. Let me elaborate. I have a .net application and some of the functionality of this application I have exposed through a dll. I have used COMVisible attribute to expose the functionality in this dll to other application. I register this dll with registry using regasm tool (and not through regsvr32 or something.... that's why I said I'm not registering the dll with registry). Now client developed in VB or VC++ can use this dll (registered as COM with registry) to consume the functionality exposed by my .Net application. When I put my client application in a path other then my .net component path it fails to find out the path for the dependency dlls. I hope now question is clear. Sorry for replying to your question is hush hush... :)

            C 1 Reply Last reply
            0
            • K KrunalC

              I think we are not talking on the same line. Let me elaborate. I have a .net application and some of the functionality of this application I have exposed through a dll. I have used COMVisible attribute to expose the functionality in this dll to other application. I register this dll with registry using regasm tool (and not through regsvr32 or something.... that's why I said I'm not registering the dll with registry). Now client developed in VB or VC++ can use this dll (registered as COM with registry) to consume the functionality exposed by my .Net application. When I put my client application in a path other then my .net component path it fails to find out the path for the dependency dlls. I hope now question is clear. Sorry for replying to your question is hush hush... :)

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

              KrunalC wrote:

              that's why I said I'm not registering the dll with registry

              KrunalC wrote:

              registered as COM with registry

              OK, spot the contradiction. If your DLL is COM, it's in the registry and you can put it anywhere. It may still need some dlls ( it sure needs the .NET framework ), and that could be your issue. Hard to say, based on the level of detail you've provided ( I did ask once about the dlls it needs, but you did not give a specific reply )

              Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

              K 1 Reply Last reply
              0
              • C Christian Graus

                KrunalC wrote:

                that's why I said I'm not registering the dll with registry

                KrunalC wrote:

                registered as COM with registry

                OK, spot the contradiction. If your DLL is COM, it's in the registry and you can put it anywhere. It may still need some dlls ( it sure needs the .NET framework ), and that could be your issue. Hard to say, based on the level of detail you've provided ( I did ask once about the dlls it needs, but you did not give a specific reply )

                Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

                K Offline
                K Offline
                KrunalC
                wrote on last edited by
                #7

                the COM interop dll is also using some dlls developed as part of our application. so it is failing to find these dlls n not the .net framework dll. What i have done is I have put codebase entry in my registry along with dll registration. So i think it finds the COM Interop dll but com interop dll in turn fails to get the dependancy dlls. hope things are clear now. If not pls revert back for more clarification. Thank you very much for your persistent support. I really appreciate it.

                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