When VCOMM receives a call to open a device, it receives a string from the client which identifies the device to open. This is either a PortName string or a FriendlyName string. VCOMM searches the list of devices it has been called to load, attempting to match the string against their hardware key PortName and FriendlyName values.
If VCOMM matches the string to a device's PortName (for example, "COM1"), it will load the port driver VxD specified by that device's PortDriver value (for example, "serial.vxd"). Similarly, if VCOMM matches on FriendlyName (for example, "Hayes compatible modem"), it will load the port driver VxD specified by that device's FriendlyDriver key (for example, "unimodem.vxd"). In the FriendlyName case, if FriendlyDriver is not present, VCOMM will use the PortDriver instead. If no match is found, VCOMM fails the open call.
If the port driver is already loaded, VCOMM increments the open count for the driver. When a port is closed, VCOMM decrements the driver's open count. When a driver's open count reaches 0, it is unloaded from memory.