Reference Problems


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 8 of 8

Thread: Reference Problems

  1. #1
    Join Date
    Feb 2007
    Posts
    49

    Reference Problems

    I am trying to reference a third party dll. I get an error "No type libraries were found in the componant." Whats up with that? I think it was written in C++, I am using VB.Net. I have the .h and a .lib files. What can I do?

  2. #2
    Join Date
    Dec 2003
    Posts
    2,750
    Sounds like a standard Windows DLL. Do you have any documentation for this DLL or did you download it from somewhere?
    Paul
    ~~~~
    Microsoft MVP (Visual Basic)

  3. #3
    Join Date
    Feb 2007
    Posts
    49
    It came with a developer's kit for a satalight modem. I am trying to write a web app to poll the modem, which won't be too hard once I can call their functions. The documentation states that I can use the dll with vs2005. I am in contact with the Tech Support, but I like to do my homework. How would I call this as an api? I havn't written code for a few months and forgot most of what i halfazed learned.

  4. #4
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    If it's a standard (that is, not COM) DLL, you cannot set a reference to it. You would use VB's Declare statement to declare the functions in the DLL you want to call, just as you would for a Windows API function.
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

  5. #5
    Join Date
    Feb 2007
    Posts
    49
    I try, but fail. I am trying two different ways

    <System.Runtime.InteropServices.DllImport("dapc2.DLL")> _
    Public Shared Function DAP_create_session() As IntPtr
    End Functionand

    Declare Function DAP_create Lib "dapc2.dll" Alias "DAP_create_session" () As IntPtrboth result in "Unable to find an entry point named 'DAP_create_session' in DLL 'dapc2.dll'. "

    What am I doing wrong?

  6. #6
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    You should talk to their tech support. We don't know anything about this DLL.
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

  7. #7
    Join Date
    Feb 2007
    Posts
    49
    Pretty much what I though. Am I atleast trying to call it right? Which way is better?

  8. #8
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    Neither method is "better." Whichever method works is best. ;-)
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

Similar Threads

  1. About adding a reference
    By metzler000 in forum C++
    Replies: 4
    Last Post: 05-01-2007, 06:54 AM
  2. library linking problem
    By sankar_de in forum C++
    Replies: 5
    Last Post: 08-10-2005, 08:35 AM
  3. Best Practices -- creating reference
    By Michael in forum .NET
    Replies: 1
    Last Post: 06-13-2002, 02:08 PM
  4. Replies: 0
    Last Post: 06-12-2002, 11:59 AM
  5. mdi problems: control reference syntax??
    By John Wood in forum Architecture and Design
    Replies: 1
    Last Post: 06-27-2001, 12:31 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center