Written by Mike D Sutton
EDais@mvps.org

Http://www.mvps.org/EDais/

- 19.09.2002 -

Introduction:

VB is one of the nicest languages I’ve ever written in which is why I’ve decided to keep supporting it here with another tutorial on the subject which will hopefully give it a little extra lease of life to those developers feeling forced into other languages.
I will however be the first to admit that VB does have some downfalls, which other languages are far more capable in - Knowing the strengths and weakness of a language can greatly enhance your final applications by exploiting the best parts of each development language and linking those parts together into the final application.
One common way of linking bits of applications together is to use DLL’s (Dynamic link libraries), which can be called upon from other applications to enhance their functionality, and they are what this tutorial covers. I’ll be concentrating on VC++ and VC++.NET in this tutorial however the same principles could most likely be applied in other similar languages.

Since I don’t want to assume that everyone has (or even wants to use) VC++.NET, I’ll be writing this tutorial in tandem between that and VC++ 6 so you can pick and choose which sections you want to read. The majority of the code is exactly the same though since VC++ didn’t receive the huge shake-up that VB did in the .NET conversion so only the first chapter will be written twice, the rest is coded the same in either development language.

This tutorial assumes no prior knowledge of C++ and approaches the language from a VB developer’s perspective unlike most other C++ tutorials. Any prior knowledge of basic syntax would be preferable to ease the learning curve though, and a basic knowledge of the Win32 API would as always be useful but again not essential.

Note: Anywhere in the tutorial when you see [DLLName], replace it with the name of your DLL and similarly [DLLPath] with the path of your DLL, this just means I can keep the majority of the tutorial generic under both VC++ and VC++.NET.

Now, code warrior, choose your weapon of choice:

 

Chapter index:

You can download this tutorial to disk for easier viewing offline as an Adobe Acrobat PDF:

Adobe Acrobat PDF doccument (588kb)

And the code for all the chapters:

Code (12.1kb)

Back to tutorials