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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. Problem in adding dll files

Problem in adding dll files

Scheduled Pinned Locked Moved Visual Basic
helpcsharpcom
4 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.
  • N Offline
    N Offline
    Nanda1605
    wrote on last edited by
    #1

    Hi I am trying to add *.dll files as a reference in VB.NET 2005 but am recieveing the message as 'A reference (Path) could not be added please make sure that the file is accessible and that it is a valid assembly or COM components'. Help me to proceed......

    Thanks, Nanda

    W 1 Reply Last reply
    0
    • N Nanda1605

      Hi I am trying to add *.dll files as a reference in VB.NET 2005 but am recieveing the message as 'A reference (Path) could not be added please make sure that the file is accessible and that it is a valid assembly or COM components'. Help me to proceed......

      Thanks, Nanda

      W Offline
      W Offline
      WhiteGirl23
      wrote on last edited by
      #2

      hi, if you want to add reference to project: go in solution explorer and you will find Reference and click right on Reference and choose Add Reference and after that you can choose your reference hope it helped.

      N 1 Reply Last reply
      0
      • W WhiteGirl23

        hi, if you want to add reference to project: go in solution explorer and you will find Reference and click right on Reference and choose Add Reference and after that you can choose your reference hope it helped.

        N Offline
        N Offline
        Nanda1605
        wrote on last edited by
        #3

        Hi, am recieving the error message while adding the reference(i can't able to add that dll), please help in this Error message: 'A reference (Path) could not be added please make sure that the file is accessible and that it is a valid assembly or COM components'.

        Thanks, Nanda

        D 1 Reply Last reply
        0
        • N Nanda1605

          Hi, am recieving the error message while adding the reference(i can't able to add that dll), please help in this Error message: 'A reference (Path) could not be added please make sure that the file is accessible and that it is a valid assembly or COM components'.

          Thanks, Nanda

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          You're getting this error message because your trying to add a reference to a .DLL that is not COM-based, just like the message says. In order to use the functions in that .DLL, you do NOT add a reference to it. You call the functions through P/Invoke. Define the function headers in your code using the Declare statement and setting up the arguments that the function is expecting. For example, to call the Win32 Beep function found in kernel32.dll:

          Declare Function Beep Lib "kernel32.dll" (ByVal frequency As Integer, ByVal duration As Integer) As Boolean

          Then later in your code:

          Dim r As Boolean
          ' Make a sound at 4000Hz, for 250 millisecond (1/4 second)
          r = Beep(4000, 250)
          

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
               2006, 2007

          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