How To Make C DLL More Accessible to VB with a Type Library (189133)
The information in this article applies to:
- Microsoft Visual Basic Learning Edition for Windows 5.0
- Microsoft Visual Basic Learning Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 5.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual C++, 32-bit Professional Edition 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
This article was previously published under Q189133 SUMMARY
Since its first release, Visual Basic has provided the Declare statement as
a means for you to take advantage of DLL functions written in other
languages, such as C. But Declare statements are less than perfect and
often require you to know as much about the DLL as you do about Visual
Basic code. A type library creates a more Visual Basic-friendly way of
calling exported C functions.
This article demonstrates how to create a type library when you build your
DLL, and how to reference that library from Visual Basic.
REFERENCES
For additional information on the structure of ODL or IDL, please see the
following articles in the Microsoft Developer Network (MSDN) Library:
TITLE : Type Libraries and the Object Description Language
TITLE : Interface Definitions and Type Libraries
For additional information, please see the following articles in the
Microsoft Knowledge Base:
143258
: How to Create Constants and DLL Declarations in a Type Library
122285
: How To Add Type Libraries as Resources to .dll and .exe Files
142840
: Visual Basic Requirements for Exported DLL Functions
(c) Microsoft Corporation 1998, All Rights Reserved. Contributions by
Richard R. Taylor, Microsoft Corporation
Modification Type: | Minor | Last Reviewed: | 7/1/2004 |
---|
Keywords: | kbhowto KB189133 |
---|
|