DLL Procedures

The document shown in the following site discusses how to access procedures from DLLs by declaring a DLL Procedure.
As we know, we also can access procedures from DLLs by setting a reference through the Project/References ... from the menu to reveal the References dialog.

I wonder whether they are related each other or totally different concept.
 
http://msdn.microsoft.com/library/devprods/vs6/vbasic/vbcon98/vbcondeclaringdllprocedure.htm
leeannAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
John Mc HaleConnect With a Mentor Forensic Computer Examiner, Analyst/Programmer & Database ArchitectCommented:
The Project/References Dialog within Visual Basic allows the programmers to specify references to DLLs and OCXs which support automation. This allows Visual Basic to discover the DLLs/OCXs automation interfaces, and therefore allows the programmer to create instances of objects exported by those DLLs. "Standard" DLLs which do not support automation (such as many of those found within the Win32 API) have therefore to be treated slightly differently ... as the Microsoft Document outlines. This covers the case in which you wish to interface directly to DLLS which do not have automation interfaces.

Example:

Suppose within the Projects/References Dialog, you reference an automation DLL called RDO.dll, containing Remote Data Objects, then within your VB code, you might use statements such as

Dim rdoobj as rdoConnection

Because you have registered the RDO Dll with your app, VB "discovers" all the automation interfaces within the DLL, and knows how to create an OLE rdoConnection object.

On the other hand, suppose you wish to use the Win32 API function "GetComputerName()" within your app, because this function does not have an automation interface, you have to declare it within your code as the Microsoft Documentation outlines.

HTH
0
 
Éric MoreauSenior .Net ConsultantCommented:
Only the extension is the same.

DLL that we reference in the Project->References menu allow automation. You create instances and use them as objects.

DLL that are talked in the articles are librairies of functions/subs. Since you don't reference them and you don't instanciate them, you have to declare them. These functions/subs are often what we call API functions!
0
 
hesCommented:
Don't like to say a totally different concept, yet it is different. In the reference menu you can apply VB dll's in your app. To reference procedures you still have to declare the procedure.
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
hesCommented:
fredthered:
You said same thing that emoreau stated
0
 
leeannAuthor Commented:
Thanks!
0
 
John Mc HaleForensic Computer Examiner, Analyst/Programmer & Database ArchitectCommented:
maybe so, but I think the example helps to clarify it a bit, don't you think?
0
All Courses

From novice to tech pro — start learning today.