setupapi: enumerate serial ports
Alexandre Julliard
julliard at winehq.org
Thu Feb 3 05:59:02 CST 2005
Juan Lang <juan_lang at 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.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list