advapi32: add more helper functions
Alexandre Julliard
julliard at winehq.org
Mon Jul 31 04:01:25 CDT 2006
Robert Reif <reif at earthlink.net> writes:
> /************************************************************
> + * ADVAPI_GetComputerNameW
> + *
> + * Gets the local computer name.
> + */
> +LPCWSTR ADVAPI_GetComputerNameW()
> +{
> + static WCHAR buf[MAX_COMPUTERNAME_LENGTH + 1];
> + DWORD dwSize = sizeof(buf);
> + if (!GetComputerNameW(buf, &dwSize))
> + buf[0] = 0;
> + return buf;
You don't want to use a static buffer, that's not thread-safe.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list