Juan Lang juan_lang@yahoo.com writes:
+/* Based on code from winspool's info.c */ +static UINT SETUP_CountSerialPorts(void) +{
- UINT i, ret;
- /* FIXME: it should be possible for more than four COM ports to exist, not
* sure why we retain that limit, but winspool does too so go with it.
*/
- for (i = 0, ret = 0; i < 4; i++)
- {
if (SETUP_SerialPortExists(i))
ret++;
- }
- TRACE("returning %d\n", ret);
- return ret;
+}
It would probably be better to use QueryDosDevice here.