## The SAMCLASS Sample

The SAMCLASS Sample accompanies Chapter 12 and illustrates how to provide a custom property page for a new class of WDM device.

The sample includes two components:

- SAMCLASS.DLL is a 32-bit property page DLL for use with Windows 2000.
- SAMCLS16.DLL (SAMCLS16 subdirectory) is a 16-bit property page DLL for use with Windows 98.

### Building SAMCLASS

To build SAMCLASS.DLL, follow the general instructions for building user-mode programs. The Microsoft Visual C++ project file is named SAMCLASS.DSP.

To build SAMCLS16.DLL, use the SAMCLS16.MAK project (SAMCLS16 subdirectory) in Microsoft Visual C++ 1.52 or equivalent. Note that this is a 16-bit project and can’t be built with a 32-bit compiler. You’ll need to use the Options/Directories menu command to specify several directory paths. On my computer, I had the compiler installed in the c:\msvc directory and the Win98 DDK in the c:\98ddk directory. My settings are:

- Include Files Path: c:\98ddk\inc\win98\inc16;c:\msvc\include;c:\msvc\mfc\include;c:\98ddk\inc\win98
- Library Files Path: c:\msvc\lib;c:\msvc\mfc\lib;c:\98ddk\lib\win98

It won’t work to specify project-specific include directories because the search order won’t end up right.

### Testing SAMCLASS

If you installed the book samples normally, the setup program will have installed SAMCLASS or SAMCLS16 as the property page provider for the SAMPLE class of devices. Each time you view the properties of one of the book sample drivers in Device Manager, you’ll be able to view the Sample Information page that these DLLs provide.