Results 1 to 3 of 3

Thread: Can I use static libraries in VB project?

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2001
    Posts
    2

    Can I use static libraries in VB project?

    Hi, everyone:
    I want to use a static library generated by Visual C++ in my VB project. Is it possible?
    Thanks.

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744
    Yes, the exported functions exposed from static DLL is called API (Application Programming Interface). In order for you to use it, you have to declare it first (in General Declaration of a form, class or a module). If you declare it in the form level, it has to be declared as private. Here is an example of declaring API function for the kernel32.dll
    VB Code:
    1. Private Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long

  3. #3

    Thread Starter
    New Member
    Join Date
    Dec 2001
    Posts
    2
    I'm sorry but maybe you misunderstand my meanings. I want to call a static library, not a dynamic loaded library(DLL). Because I want to distribute my application without the extra DLL.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width