Re: [PATCH 1/5] mstask: Implement ITaskScheduler_GetTargetComputer
5 Nov
2012
5 Nov
'12
10:38 a.m.
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
4788
Age (days ago)
4788
Last active (days ago)
0 comments
1 participants
participants (1)
-
Alexandre Julliard