
Device File Name Prefixes
The device file name prefix consists of three uppercase letters that identify which device file name corresponds to a particular stream interface. When you implement the stream interface, you designate the three-letter prefix. The prefix can be any three letters, although you should use a common prefix if your driver is the same class of device as other drivers. 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 other drivers by using a different index.
The prefix serves two purposes. 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 file names to expect in the stream interface 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_Init, PGR_IOControl, and so on.
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 other values that the driver needs. If the Prefix subkey does not exist, then there must be initialization and de-initialization entry points.