Developing Drivers with the Windows Driver Foundation (Pro Developer)

To begin, it is helpful to understand how UMDF drivers use COM. UMDF drivers are implemented as in-process COM objects, sometimes abbreviated to InProc objects or COM servers. In-process objects are packaged in a DLL and run in the context of their host process. A DLL can contain any number of in-process COM objects.

All UMDF DLLs contain at least three required COM servers and typically several optional ones, depending on the requirements of the device. The DLL must also export two standard functions. Figure 18-1 shows the contents of a typical UMDF driver DLL.

Figure 18-1: Schematic drawing of a UMDF driver DLL

The following list provides a brief description of the key components of the figure. These components are discussed in detail later in this chapter:

The UMDF runtime also contains a number of COM objects that drivers must use to interact with the runtime. A process that uses a COM object is referred to as a COM client. Implementing a UMDF driver thus consists largely of implementing several COM callback objects, which act as COM clients to interact with the UMDF runtime. This chapter discusses the basics of how COM is used to implement the components of the DLL shown in Figure 18-1.

Категории