Re: [PATCH] user32: Use function parameter if it set to be not stub
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 2015-03-27 um 21:52 schrieb Sergey Isakov:
{ + if (!lpDisplayDevice) { + return FALSE; + } This is probably correct, but it needs a test. Currently this function crashes if this parameter is NULL. I can imagine that EnumDisplayDevices(NULL, 1, NULL, 0) returns TRUE if display 1 exists and FALSE otherwise.
+ + if (i) { FIXME("(%s,%d,%p,0x%08x), stub!\n",debugstr_w(lpDevice),i,lpDisplayDevice,dwFlags); - - if (i) return FALSE; + } This is an unrelated change and matters more for what the patch description says it does. Though if I understand this right we want this check to be "if (i || lpDevice)" because the application can also pass in a device name.
+ if (lpDevice) { + strcpyW(lpDisplayDevice->DeviceName, lpDevice); + } else { memcpy(lpDisplayDevice->DeviceName, primary_device_name, sizeof(primary_device_name)); + }
This is yet another unrelated change. It looks OK, but I don't think it really matters. Copying the input display name will at best paper over the fact that our implementation of this function does not support multiple display devices. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJVFo0tAAoJEN0/YqbEcdMw+eQP/1SnlfkRjPZ/8PW8+m3iOYHC OTLWOE7Io94FzLfFQO487pCbsqgd9199UWp3IolfUe/y2vS4LtosxQQh1tLG7j7A rsypwNjV8OwSHvXiL5BH/4QvZTAqoctW484E7z7IHzMXMqa2Oyrj5K3QXHVes6O5 9xEB1UuSkB19Z0jIQqHPR4Hc/o8gYuCAER05BiTqOZcBSsrVhfOOZ+FKR7krWqdP o3VkOmUSWhX+9ziTsKmWGsBEZk0r81RMG2cbT/eShAtBBZs/+YtUfYiNY2q+tCoF fMiEfiMU7e1TqroBJAw37gYju+qt3xon/RuyOQD13a3hwWSDzMeoE9PAf9TxCK4Q OinEV45U8RiDkczviuOQluojfmJSXmVCC2BjPPQ2ZtmGXyuRXLrlRZ4KsCE/xhyV p2+Za2U/cvfqy0ug5isnnFGu/lKi1RCeGXsbHX6ZF5amTEfuklQpWolacrGilxZ2 kYiBtV93A/IJzUPaj2d97JbEFG2nMP6pT+KTSFBJIY2bzzzhnX1Fltd8kt3Vp/rv MOUPs/peC9sv17wDc5LREPAbA7LOBuN4M3M+5O2glO/F96gt8FSsPYyZy9sMRXEv eEuQgGbFbm9KKCWBK53mm78aAFiulqEd3S4vFXnvNU5sFxUW/BO3TxDZJhPEAK2v BeJJ0ZjH01mfQ8lhDQph =RL+u -----END PGP SIGNATURE-----
participants (1)
-
Stefan Dösinger