Re: advapi32: add more helper functions
31 Jul
2006
31 Jul
'06
9:01 a.m.
Robert Reif <reif(a)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(a)winehq.org
7075
Age (days ago)
7075
Last active (days ago)
0 comments
1 participants
participants (1)
-
Alexandre Julliard