|
-
Dec 14th, 2001, 08:29 AM
#1
Thread Starter
New Member
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.
-
Dec 14th, 2001, 09:37 AM
#2
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:
Private Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
-
Dec 14th, 2001, 09:20 PM
#3
Thread Starter
New Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|