>Win windows 95 / 98 the modem name and port assignment are found in the registry. With win 2000 or NT4 I have not been able to find out how to detect a modem and the port assignment
The COM ports are named in HKEY_LOCAL_MACHINE\Hardware\DeviceMap\SERIALCOMM - it names them but does not tell you about them. The modems are in the registry but are managed via TAPI and RAS; NT is not happy with standard applications doing direct I/O through hardware; much of the stability and safety of the NT and 2K platform is based on the OS virtualizing the underlying hardware and guarding against direct resource access by untrusted application-layer processes.
The current modem detail is found under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Modem - it's not the details you want, though. The TAPI detail is at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TapiSrv