--- Alexandre Julliard <julliard(a)winehq.org> wrote:
+/* 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.
I'm not sure it is. I just tried it, and QueryDosDevice returns success for every COMx passed to it, even though only com1 exists in my dosdevices directory. Unless QueryDosDevice is also wrong (I don't know.) --Juan __________________________________ Do you Yahoo!? Yahoo! Mail - 250MB free storage. Do more. Manage less. http://info.mail.yahoo.com/mail_250