How Do I Reference a COM DLL?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • TC

    How Do I Reference a COM DLL?

    I posted this question earlier, but didn't receive a reply, so I'm
    going to rephrase it and try again.

    I have a VB.NET application which requires a COM DLL. When I add a
    reference to the DLL, Visual Studio creates an Interop DLL. That seems
    okay. I can compile the application and run it on my development
    computer.

    When I copy the executable and all the DLLs over to the production
    computer, however, the system does not use the COM DLL I put in the
    application folder. It uses a different DLL which has a bug and causes
    my application to fail.

    Why is the system using the wrong DLL? How do I force it to use the
    right one?


    -TC
  • kimiraikkonen

    #2
    Re: How Do I Reference a COM DLL?

    On Feb 11, 9:24 pm, TC <golemdan...@ya hoo.comwrote:
    I posted this question earlier, but didn't receive a reply, so I'm
    going to rephrase it and try again.
    >
    I have a VB.NET application which requires a COM DLL. When I add a
    reference to the DLL, Visual Studio creates an Interop DLL. That seems
    okay. I can compile the application and run it on my development
    computer.
    >
    When I copy the executable and all the DLLs over to the production
    computer, however, the system does not use the COM DLL I put in the
    application folder. It uses a different DLL which has a bug and causes
    my application to fail.
    >
    Why is the system using the wrong DLL? How do I force it to use the
    right one?
    >
    -TC
    Was that DLL located and referenced from windows\system3 2 folder?

    Comment

    • =?Utf-8?B?RmFtaWx5IFRyZWUgTWlrZQ==?=

      #3
      RE: How Do I Reference a COM DLL?

      Did you register (regsvr32) the com dll? Is this a 3rd party dll? If so,
      which version is the later version?

      "TC" wrote:
      I posted this question earlier, but didn't receive a reply, so I'm
      going to rephrase it and try again.
      >
      I have a VB.NET application which requires a COM DLL. When I add a
      reference to the DLL, Visual Studio creates an Interop DLL. That seems
      okay. I can compile the application and run it on my development
      computer.
      >
      When I copy the executable and all the DLLs over to the production
      computer, however, the system does not use the COM DLL I put in the
      application folder. It uses a different DLL which has a bug and causes
      my application to fail.
      >
      Why is the system using the wrong DLL? How do I force it to use the
      right one?
      >
      >
      -TC
      >

      Comment

      • TC

        #4
        Re: How Do I Reference a COM DLL?

        On Feb 11, 12:04 pm, Family Tree Mike
        <FamilyTreeM... @discussions.mi crosoft.comwrot e:
        Did you register (regsvr32) the com dll?  Is this a 3rd party dll?  Ifso,
        which version is the later version?
        >
        >
        >
        "TC" wrote:
        I posted this question earlier, but didn't receive a reply, so I'm
        going to rephrase it and try again.
        >
        I have a VB.NET application which requires a COM DLL. When I add a
        reference to the DLL, Visual Studio creates an Interop DLL. That seems
        okay. I can compile the application and run it on my development
        computer.
        >
        When I copy the executable and all the DLLs over to the production
        computer, however, the system does not use the COM DLL I put in the
        application folder. It uses a different DLL which has a bug and causes
        my application to fail.
        >
        Why is the system using the wrong DLL? How do I force it to use the
        right one?
        >
        -TC- Hide quoted text -
        >
        - Show quoted text -
        Kimiraikkonen and Mike,

        Thank you for responding to my post. Here are details:

        - Neither DLL is located in windows\system3 2.

        - It is a 3rd party DLL. The buggy version is newer (1.3.4.333) than
        the good version (1.3.1.247).

        - The buggy version is registered. The good version is not. I'm afraid
        to register the good version because I don't know what that will do to
        the buggy version. This is the production computer, and other software
        may rely on the buggy version.


        -TC

        Comment

        • =?Utf-8?B?RmFtaWx5IFRyZWUgTWlrZQ==?=

          #5
          Re: How Do I Reference a COM DLL?



          "TC" wrote:
          On Feb 11, 12:04 pm, Family Tree Mike
          <FamilyTreeM... @discussions.mi crosoft.comwrot e:
          Did you register (regsvr32) the com dll? Is this a 3rd party dll? If so,
          which version is the later version?



          "TC" wrote:
          I posted this question earlier, but didn't receive a reply, so I'm
          going to rephrase it and try again.
          I have a VB.NET application which requires a COM DLL. When I add a
          reference to the DLL, Visual Studio creates an Interop DLL. That seems
          okay. I can compile the application and run it on my development
          computer.
          When I copy the executable and all the DLLs over to the production
          computer, however, the system does not use the COM DLL I put in the
          application folder. It uses a different DLL which has a bug and causes
          my application to fail.
          Why is the system using the wrong DLL? How do I force it to use the
          right one?
          -TC- Hide quoted text -
          - Show quoted text -
          >
          Kimiraikkonen and Mike,
          >
          Thank you for responding to my post. Here are details:
          >
          - Neither DLL is located in windows\system3 2.
          >
          - It is a 3rd party DLL. The buggy version is newer (1.3.4.333) than
          the good version (1.3.1.247).
          >
          - The buggy version is registered. The good version is not. I'm afraid
          to register the good version because I don't know what that will do to
          the buggy version. This is the production computer, and other software
          may rely on the buggy version.
          >
          >
          -TC
          >
          I think you have a few options. You might try debugging on a development
          version with the newer dll. This may be futile as you seem to indicate that
          the newer dll is buggy. Another choice is looking up examples of reg-free
          com. There are numerous blogs on how to do this. This could help in this
          situation.

          Comment

          • kimiraikkonen

            #6
            Re: How Do I Reference a COM DLL?

            On Feb 12, 2:12 am, TC <golemdan...@ya hoo.comwrote:
            On Feb 11, 12:04 pm, Family Tree Mike
            >
            >
            >
            <FamilyTreeM... @discussions.mi crosoft.comwrot e:
            Did you register (regsvr32) the com dll? Is this a 3rd party dll? If so,
            which version is the later version?
            >
            "TC" wrote:
            I posted this question earlier, but didn't receive a reply, so I'm
            going to rephrase it and try again.
            >
            I have a VB.NET application which requires a COM DLL. When I add a
            reference to the DLL, Visual Studio creates an Interop DLL. That seems
            okay. I can compile the application and run it on my development
            computer.
            >
            When I copy the executable and all the DLLs over to the production
            computer, however, the system does not use the COM DLL I put in the
            application folder. It uses a different DLL which has a bug and causes
            my application to fail.
            >
            Why is the system using the wrong DLL? How do I force it to use the
            right one?
            >
            -TC- Hide quoted text -
            >
            - Show quoted text -
            >
            Kimiraikkonen and Mike,
            >
            Thank you for responding to my post. Here are details:
            >
            - Neither DLL is located in windows\system3 2.
            >
            - It is a 3rd party DLL. The buggy version is newer (1.3.4.333) than
            the good version (1.3.1.247).
            >
            - The buggy version is registered. The good version is not. I'm afraid
            to register the good version because I don't know what that will do to
            the buggy version. This is the production computer, and other software
            may rely on the buggy version.
            >
            -TC
            Another option: If your dll has no dependecy except your app, you can
            rename buggy version to something before the installation to force not
            to register a unwanted dll. Then leave the correct version and let
            your app app is installed the bug-free dll must have registered and
            must be in use.

            Comment

            Working...