Question DLL import question?

casper

Member
Joined
Jun 6, 2006
Messages
10
Programming Experience
Beginner
Hi there,

does anyone know the differences of the following dll import?
  1. Using "Public Declare Sub TEST Lib "TEST.dll ()
  2. Using "<DllImport("KERNEL32.DLL"
  3. By Adding the dll file to the COM component

what does tlb (type library) file? how does it different with dll file?

thanks
R
 
1 and 2 are for importing functions that are exported from non-COM DLLs, while 3 is obviously only valid for COM components.

1 is the old VB6 way of importing external functions while 2 is the .NET way. Both work in VB.NET but I'd suggest you use 2. There are a few things that you can do with DllImport that you can't with Declare.

Look first, ask questions later:

tlb type library - Google Search
 
Back
Top