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.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

É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!
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.
John Mc HaleForensic 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.


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.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

You said same thing that emoreau stated
leeannAuthor Commented:
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?
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.