mirror of
https://github.com/reactos/reactos.git
synced 2024-08-12 14:16:30 +00:00
[ADVAPI32]
* Update ADVAPI_IsLocalComputer(). CORE-8540 svn path=/trunk/; revision=64981
This commit is contained in:
parent
21ef917d3f
commit
93ecff8e68
|
@ -325,12 +325,12 @@ BOOL ADVAPI_IsLocalComputer(LPCWSTR ServerName)
|
|||
if (!ServerName || !ServerName[0])
|
||||
return TRUE;
|
||||
|
||||
buf = HeapAlloc(GetProcessHeap(), 0, dwSize * sizeof(WCHAR));
|
||||
buf = heap_alloc(dwSize * sizeof(WCHAR));
|
||||
Result = GetComputerNameW(buf, &dwSize);
|
||||
if (Result && (ServerName[0] == '\\') && (ServerName[1] == '\\'))
|
||||
ServerName += 2;
|
||||
Result = Result && !lstrcmpW(ServerName, buf);
|
||||
HeapFree(GetProcessHeap(), 0, buf);
|
||||
heap_free(buf);
|
||||
|
||||
return Result;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue