Device File Name Prefixes

The prefix consists of three uppercase letters that identify which special device file name corresponds to a particular stream interface driver. The prefix is stored in a registry value called Prefix, which is located within the key for the driver. Typically, the setup utility that installs a driver creates this registry value along with the other values that stream interface drivers need.

When you create a stream interface driver, you designate the three-letter prefix. It can be any three letters, although you should use a common prefix if your driver is for the same class of device as other drivers already present on the platform. For example, drivers for serial devices such as modems could use the common prefix COM, even though other drivers might already be using that prefix. Your driver can distinguish itself from any others with the same prefix by using a different index. For more information, see Device File Name Indexes.

Windows CE uses the prefix in two important ways. First, the prefix identifies all possible device file names that can access the stream interface driver. Second, the prefix tells the operating system what entry-point names to expect in the stream interface driver DLL. For example, to implement a device driver for a PC Card pager, you could choose PGR as the three-letter prefix, which in turn would dictate entry-point names, such as PGR_Open, PGR_IOControl, and so on.