다음을 통해 공유


External Naming of COM Ports

By default, the Serial function driver creates a symbolic link name for a serial port and registers a GUID_DEVINTERFACE_COMPORT device interface for the port. By definition, a serial port is a COM port only if it has a COM port device interface associated with it.

For a Plug and Play serial device, external naming is controlled by a SerialSkipExternalNaming entry value under the hardware key of the device. If the SerialSkipExternalNaming entry value does not exist, or its value is zero, Serial creates a COM port device interface; otherwise, Serial does not create a COM port interface. Serial does not support this entry value for a legacy COM port and always creates a COM port device interface for a legacy COM port.

Serial performs the following tasks to create a COM port device interface:

  • Creates a symbolic link between \DosDevices\<PortName> and the internal device object name for a COM port.

    <PortName> is the value of the PortName (or Identifier) entry value for the COM port. The Ports class installer sets PortName to COM*<n>*, where <n> is a COM port number that the installer obtains from the COM port database. Serial uses this name to create a symbolic link to the port. There is no limit to the number of COM ports that Windows supports. User-mode clients use the symbolic link name to open a COM port.

  • Writes an entry value under the \Registry\Machine\Hardware\DeviceMap\SERIALCOMM key.

    The name of the entry value is \Device\Serial<m>, where <m> is a number assigned to the device by Serial. Note that the serial device number <m> is the not the same as a COM port number <n>. The value of \Device\Serial<m> is set to the value of PortName.

  • Registers a device interface of type GUID_DEVINTERFACE_COMPORT for the COM port.

    Clients can register for notification of the arrival of a COM port interface, or can obtain the symbolic link names of all registered COM port interfaces.

For more information about how Serial uses registry entry values, see Registry Settings for Serial.

 

 

Send comments about this topic to Microsoft