ADVAPI32: Implement GetServiceDisplayNameW
Alexandre Julliard
julliard at winehq.org
Mon Apr 23 07:35:57 CDT 2007
"Rolf Kalbermatter" <r.kalbermatter at hccnet.nl> writes:
> + size = *lpcchBuffer * sizeof(WCHAR);
> + ret = RegGetValueW(hscm->hkey, lpServiceName, szDisplayName, RRF_RT_REG_SZ, &type, NULL, &size);
> + switch (ret)
> + {
> + case ERROR_SUCCESS:
> + ret = RegGetValueW(hscm->hkey, lpServiceName, szDisplayName, RRF_RT_REG_SZ, &type, lpDisplayName, &size);
> + *lpcchBuffer = (size / sizeof(WCHAR)) - 1;
> + break;
It would be better to put the data into the buffer right away, so that
you don't need two registry queries in the common case of the buffer
being large enough.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list