[ntp:hackers] /dev/ntpsymlink1 -> COM1: for ntpd on Windows

Peter Rosin peda at axentia.se
Sun May 31 21:30:59 UTC 2009


> 		snprintf(windev, sizeof(windev), "COM%d:", unit);

Just throwing in a quote from the CreateFile docs:

	"To specify a COM port number greater than 9, use the
	following syntax: "\\.\COM10". This syntax works for
	all port numbers and hardware that allows COM port
	numbers to be specified."

So, I'd say the above needs to be:

		snprintf(windev, sizeof(windev), "\\\\.\\COM%d", unit);

Cheers,
Peter


More information about the hackers mailing list