How to Customize the Skeleton Sample Source Files
The Skeleton sample source files serve as a useful starting point for most UMDF drivers. Many of them require little or no modification.
DLL Infrastructure
The DLL infrastructure for a UMDF driver typically consists of two functions that are exported by name: DllMain and DllGetClassObject. Both functions are implemented in Dllsup.cpp. The header content for this file is in Internal.h.
DllMain
DllMain is the DLL’s entry point. Windows calls DllMain after the driver binary has been loaded into a host process and again before it is unloaded. There are several restrictions on what can be done in DllMain, so the implementation is usually fairly limited.
See the DllMain reference on MSDN—online at http://go.microsoft.com/fwlink/?LinkId=80069 ...
Get Developing Drivers with the Windows® Driver Foundation 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.