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. Dll File

Dll File

Scheduled Pinned Locked Moved C#
csharphelpvisual-studiocomquestion
8 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.
  • V Offline
    V Offline
    viciouskinid
    wrote on last edited by
    #1

    There is a dll file in a program I use that contains product information for the program to use. I was wondering is there any way I can gain access to the data in the dll file in a C# project. The file dosent contain anything that I shouldnt have, it is just catalogue information. I have never accessed data from a dll file before and I dont know where to start. I can access the data using Resource hacker but when I tried to add it as a reference to my C# project in Visual studio it gave an error saying that the file isnt a valid com component. I am sure that this is obvious to anyone that has a clue about this, but as you can tell i dont. Can anyone help me access the data in the dll file?

    N C 2 Replies Last reply
    0
    • V viciouskinid

      There is a dll file in a program I use that contains product information for the program to use. I was wondering is there any way I can gain access to the data in the dll file in a C# project. The file dosent contain anything that I shouldnt have, it is just catalogue information. I have never accessed data from a dll file before and I dont know where to start. I can access the data using Resource hacker but when I tried to add it as a reference to my C# project in Visual studio it gave an error saying that the file isnt a valid com component. I am sure that this is obvious to anyone that has a clue about this, but as you can tell i dont. Can anyone help me access the data in the dll file?

      N Offline
      N Offline
      N a v a n e e t h
      wrote on last edited by
      #2

      What DLL is that? A managed one or a native DLL?

      Best wishes, Navaneeth

      V 1 Reply Last reply
      0
      • V viciouskinid

        There is a dll file in a program I use that contains product information for the program to use. I was wondering is there any way I can gain access to the data in the dll file in a C# project. The file dosent contain anything that I shouldnt have, it is just catalogue information. I have never accessed data from a dll file before and I dont know where to start. I can access the data using Resource hacker but when I tried to add it as a reference to my C# project in Visual studio it gave an error saying that the file isnt a valid com component. I am sure that this is obvious to anyone that has a clue about this, but as you can tell i dont. Can anyone help me access the data in the dll file?

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

        If it's not a COM component, then you can try to reference it as a standard .NET dll. If that doesn't work, then it's not written in .NET, and .NET is the only way you could use reflection to read the contents of the dll. Even if it was COM, you still couldn't read the contents. Your best bet in that case, is to use a hex editor to see if what you want is sitting in there in an unencrypted state.

        Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

        V 1 Reply Last reply
        0
        • C Christian Graus

          If it's not a COM component, then you can try to reference it as a standard .NET dll. If that doesn't work, then it's not written in .NET, and .NET is the only way you could use reflection to read the contents of the dll. Even if it was COM, you still couldn't read the contents. Your best bet in that case, is to use a hex editor to see if what you want is sitting in there in an unencrypted state.

          Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

          V Offline
          V Offline
          viciouskinid
          wrote on last edited by
          #4

          yeah ok thanks, but I am really looking for an easier solution.

          C 1 Reply Last reply
          0
          • N N a v a n e e t h

            What DLL is that? A managed one or a native DLL?

            Best wishes, Navaneeth

            V Offline
            V Offline
            viciouskinid
            wrote on last edited by
            #5

            dont really know the difference. All I know is that it is packaged with the program and it contains catalogue data .

            C 1 Reply Last reply
            0
            • V viciouskinid

              yeah ok thanks, but I am really looking for an easier solution.

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

              Well, it doesn't exist.

              Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

              V 1 Reply Last reply
              0
              • V viciouskinid

                dont really know the difference. All I know is that it is packaged with the program and it contains catalogue data .

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

                If you can't import it into a .NET app, then it probably is neither COM nor .NET, meaning it's just a bog standard dll, and my answer below applies.

                Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

                1 Reply Last reply
                0
                • C Christian Graus

                  Well, it doesn't exist.

                  Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

                  V Offline
                  V Offline
                  viciouskinid
                  wrote on last edited by
                  #8

                  Thanks anyway

                  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