Re: setupapi(8/22): Implement SetupDiCreateDeviceInfoW
20 Sep
2007
20 Sep
'07
6:59 a.m.
"Juan Lang" <juan.lang(a)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(a)winehq.org
6655
Age (days ago)
6655
Last active (days ago)
1 comments
2 participants
participants (2)
-
Alexandre Julliard -
Juan Lang