17.3. Creating a Simple DLL

Both DLLs and RPCs (see Chapter 9) have a certain amount of startup complexity. That is, the first time you see them, it all seems complicated because there are several different and unfamiliar pieces needed to make the system work. The goal of this section is to show you how easy it is to compile and run the simplest possible DLL. The next section explains how the program and the DLL work together.

The goal of the DLL presented in this section and the next is simple: The DLL contains one function called MultiHonk that accepts one integer parameter. The function beeps. If you pass it a 3 it beeps three times. It takes seven files to build the DLL and a test application for it, as shown in Listings 17.1 through 17.7 ...

Get Win32 System Services: The Heart of Windows® 98 and Windows® 2000 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.