Help registering a dll

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

    #1

    Help registering a dll

    Using: "regsvr32 expcg.dll" I get this error message: "expcg.dll was
    loaded, but the DllRegisterServ er entry point was not found. the file
    can not be registered."

    William Cruz

    *** Sent via Developersdex http://www.developersdex.com ***
  • Carlos J. Quintero [VB MVP]

    #2
    Re: Help registering a dll

    That means that the DLL is not not an ActiveX DLL...
    --

    Best regards,

    Carlos J. Quintero

    MZ-Tools: Productivity add-ins for Visual Studio
    You can code, design and document much faster:
    MZ-Tools has a single goal: To make your everyday programming life easier. As an add-in to several Integrated Development Environment (IDEs) from Microsoft, MZ-Tools adds new menus and toolbars to them that provide many new productivity features.



    "William Cruz" <wcruzcc@msn.co m> escribió en el mensaje
    news:%23MhQhvvj GHA.3588@TK2MSF TNGP02.phx.gbl. ..[color=blue]
    > Using: "regsvr32 expcg.dll" I get this error message: "expcg.dll was
    > loaded, but the DllRegisterServ er entry point was not found. the file
    > can not be registered."
    >
    > William Cruz
    >
    > *** Sent via Developersdex http://www.developersdex.com ***[/color]


    Comment

    • Claes Bergefall

      #3
      Re: Help registering a dll

      If you're trying to register a .NET assembly for use with COM use regasm.exe
      instead

      /claes

      "Carlos J. Quintero [VB MVP]" <carlosq@NOSPAM sogecable.com> wrote in message
      news:OclB%239vj GHA.4716@TK2MSF TNGP03.phx.gbl. ..[color=blue]
      > That means that the DLL is not not an ActiveX DLL...
      > --
      >
      > Best regards,
      >
      > Carlos J. Quintero
      >
      > MZ-Tools: Productivity add-ins for Visual Studio
      > You can code, design and document much faster:
      > http://www.mztools.com
      >
      >
      > "William Cruz" <wcruzcc@msn.co m> escribió en el mensaje
      > news:%23MhQhvvj GHA.3588@TK2MSF TNGP02.phx.gbl. ..[color=green]
      >> Using: "regsvr32 expcg.dll" I get this error message: "expcg.dll was
      >> loaded, but the DllRegisterServ er entry point was not found. the file
      >> can not be registered."
      >>
      >> William Cruz
      >>
      >> *** Sent via Developersdex http://www.developersdex.com ***[/color]
      >
      >[/color]


      Comment

      • William Cruz

        #4
        Re: Help registering a dll

        I'm wanting to use my DLL app in VBA for AutoCAD.

        William Cruz

        *** Sent via Developersdex http://www.developersdex.com ***

        Comment

        • William Cruz

          #5
          Re: Help registering a dll

          What steps do I need to take to make my DLL an ActiveX.

          William Cruz

          *** Sent via Developersdex http://www.developersdex.com ***

          Comment

          • Carlos J. Quintero [VB MVP]

            #6
            Re: Help registering a dll

            First you must decide if you want to create:

            - A .NET assembly Dll: in this case the Dll can be registered for COM
            Interop using regasm.exe. See COM Interop in the MSDN docs. For example:

            Exposing .NET Framework Components to COM
            http://msdn2.microsoft.com/en-us/lib...39(VS.80).aspx

            - A native ActiveX dll: in this case you can´t use a .NET language but you
            can still use VS.NET to create a Visual C++ DLL, or use VB6, etc.

            --

            Best regards,

            Carlos J. Quintero

            MZ-Tools: Productivity add-ins for Visual Studio
            You can code, design and document much faster:
            MZ-Tools has a single goal: To make your everyday programming life easier. As an add-in to several Integrated Development Environment (IDEs) from Microsoft, MZ-Tools adds new menus and toolbars to them that provide many new productivity features.



            "William Cruz" <wcruzcc@msn.co m> escribió en el mensaje
            news:eSUSPlwjGH A.4264@TK2MSFTN GP02.phx.gbl...[color=blue]
            > What steps do I need to take to make my DLL an ActiveX.
            >
            > William Cruz[/color]


            Comment

            • Sugan

              #7
              Re: Help registering a dll

              You can just save the dll in the same folder where your application
              exists. This would help, if your dll is not a activex dll.

              -Sugan

              William Cruz wrote:[color=blue]
              > What steps do I need to take to make my DLL an ActiveX.
              >
              > William Cruz
              >
              > *** Sent via Developersdex http://www.developersdex.com ***[/color]

              Comment

              • William Cruz

                #8
                Re: Help registering a dll

                I have done the first of your suggestions. I registered the DLL using
                regasm.com in this manner: “regasm expcg.dll /tlb:expcg.tlb”. I then
                went into VBA for AutoCAD and went to “add reference” and then “expcg”
                to add as a reference, this all works fine. I then declare it this way:
                “Dim Calcs As New ExpCG.ExpCG_Cal cs” This also goes as planned. Now when
                I try to use it, I get an error. I try to use it this by setting a value
                withing the dll “Calcs.UnitWeig ht = 144” and I get this error.

                Run-time error ‘-2147024894 (80070002)’:
                The system cannot find the file specified.


                Before using regasm.exe, I copied the dll file from the project
                directory into the Windows\system3 2\ directory.


                William Cruz

                *** Sent via Developersdex http://www.developersdex.com ***

                Comment

                • Carlos J. Quintero [VB MVP]

                  #9
                  Re: Help registering a dll

                  Hi,

                  Try registering the DLL with the codebase flag:

                  regasm.exe /codebase expgc.dll etc

                  --

                  Best regards,

                  Carlos J. Quintero

                  MZ-Tools: Productivity add-ins for Visual Studio
                  You can code, design and document much faster:
                  MZ-Tools has a single goal: To make your everyday programming life easier. As an add-in to several Integrated Development Environment (IDEs) from Microsoft, MZ-Tools adds new menus and toolbars to them that provide many new productivity features.





                  "William Cruz" <wcruzcc@msn.co m> escribió en el mensaje
                  news:%23$Nfo76j GHA.4104@TK2MSF TNGP04.phx.gbl. ..[color=blue]
                  >I have done the first of your suggestions. I registered the DLL using
                  > regasm.com in this manner: "regasm expcg.dll /tlb:expcg.tlb". I then
                  > went into VBA for AutoCAD and went to "add reference" and then "expcg"
                  > to add as a reference, this all works fine. I then declare it this way:
                  > "Dim Calcs As New ExpCG.ExpCG_Cal cs" This also goes as planned. Now when
                  > I try to use it, I get an error. I try to use it this by setting a value
                  > withing the dll "Calcs.UnitWeig ht = 144" and I get this error.
                  >
                  > Run-time error '-2147024894 (80070002)':
                  > The system cannot find the file specified.
                  >
                  >
                  > Before using regasm.exe, I copied the dll file from the project
                  > directory into the Windows\system3 2\ directory.
                  >
                  >
                  > William Cruz[/color]


                  Comment

                  Working...