setupapi(8/22): Implement SetupDiCreateDeviceInfoW
Alexandre Julliard
julliard at winehq.org
Thu Sep 20 06:59:19 CDT 2007
"Juan Lang" <juan.lang at gmail.com> writes:
> +static DWORD SETUPDI_DevNameToDevID(LPCWSTR devName)
> +{
> + LPCWSTR ptr;
> + DWORD devNameLen = lstrlenW(devName), devInst = 0;
> + BOOL valid = TRUE;
> +
> + TRACE("%s\n", debugstr_w(devName));
> + for (ptr = devName; valid && *ptr && ptr - devName < devNameLen; )
> + {
> + if (isdigitW(*ptr))
> + {
> + devInst <<= 8;
This won't do what you want. You'd need *= 10 if the id is really
stored in decimal, though 0000 looks more like it should be in hex.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list