Detlef Riekenberg <wine.dev(a)web.de> writes:
> @@ -28,6 +28,22 @@ typedef struct
> LONG ref;
> } TaskSchedulerImpl;
>
> +static LPWSTR get_unc_computername(void)
> +{
> + static WCHAR buffer[MAX_COMPUTERNAME_LENGTH + 3]; /* extra space for two '\' and a zero */
> + DWORD len = MAX_COMPUTERNAME_LENGTH + 1; /* extra space for the zero */
> +
> + if (*buffer)
> + return buffer;
> +
> + if (!GetComputerNameW(buffer + 2, &len))
> + return NULL;
> +
> + buffer[1] = '\\';
> + buffer[0] = '\\';
> + return buffer;
> +}
You don't need a static buffer.
--
Alexandre Julliard
julliard(a)winehq.org