mirror of
https://github.com/reactos/reactos.git
synced 2025-04-22 05:00:27 +00:00
-sync netapi32 with wine 1.1.32
svn path=/trunk/; revision=43750
This commit is contained in:
parent
5b1a765b54
commit
c7b2548293
6 changed files with 47 additions and 22 deletions
|
@ -112,7 +112,7 @@ static BOOL NETAPI_IsCurrentUser(LPCWSTR username)
|
|||
BOOL ret = FALSE;
|
||||
|
||||
dwSize = LM20_UNLEN+1;
|
||||
curr_user = HeapAlloc(GetProcessHeap(), 0, dwSize);
|
||||
curr_user = HeapAlloc(GetProcessHeap(), 0, dwSize * sizeof(WCHAR));
|
||||
if(!curr_user)
|
||||
{
|
||||
ERR("Failed to allocate memory for user name.\n");
|
||||
|
@ -431,7 +431,7 @@ NetUserGetLocalGroups(LPCWSTR servername, LPCWSTR username, DWORD level,
|
|||
return status;
|
||||
|
||||
size = UNLEN + 1;
|
||||
NetApiBufferAllocate(size, (LPVOID*)¤tuser);
|
||||
NetApiBufferAllocate(size * sizeof(WCHAR), (LPVOID*)¤tuser);
|
||||
GetUserNameW(currentuser, &size);
|
||||
|
||||
if (lstrcmpiW(username, currentuser) && NETAPI_FindUser(username))
|
||||
|
@ -640,7 +640,7 @@ NetQueryDisplayInformation(
|
|||
|
||||
/* get data */
|
||||
dwSize = UNLEN + 1;
|
||||
NetApiBufferAllocate(dwSize, (LPVOID *) &name);
|
||||
NetApiBufferAllocate(dwSize * sizeof(WCHAR), (LPVOID *) &name);
|
||||
if (!GetUserNameW(name, &dwSize))
|
||||
{
|
||||
NetApiBufferFree(name);
|
||||
|
@ -731,6 +731,16 @@ NetGroupEnum(LPCWSTR servername, DWORD level, LPBYTE *bufptr, DWORD prefmaxlen,
|
|||
return ERROR_ACCESS_DENIED;
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
* NetGroupGetInfo (NETAPI32.@)
|
||||
*
|
||||
*/
|
||||
NET_API_STATUS WINAPI NetGroupGetInfo(LPCWSTR servername, LPCWSTR groupname, DWORD level, LPBYTE *bufptr)
|
||||
{
|
||||
FIXME("(%s, %s, %d, %p) stub!\n", debugstr_w(servername), debugstr_w(groupname), level, bufptr);
|
||||
return ERROR_ACCESS_DENIED;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* NetUserModalsGet (NETAPI32.@)
|
||||
*
|
||||
|
|
|
@ -1478,8 +1478,7 @@ void NetBTInit(void)
|
|||
gBCastQueries = dword;
|
||||
size = sizeof(dword);
|
||||
if (RegQueryValueExW(hKey, BcastNameQueryTimeoutW, NULL, NULL,
|
||||
(LPBYTE)&dword, &size) == ERROR_SUCCESS && dword >= MIN_QUERY_TIMEOUT
|
||||
&& dword <= MAX_QUERY_TIMEOUT)
|
||||
(LPBYTE)&dword, &size) == ERROR_SUCCESS && dword >= MIN_QUERY_TIMEOUT)
|
||||
gBCastQueryTimeout = dword;
|
||||
size = sizeof(dword);
|
||||
if (RegQueryValueExW(hKey, NameSrvQueryCountW, NULL, NULL,
|
||||
|
@ -1488,8 +1487,7 @@ void NetBTInit(void)
|
|||
gWINSQueries = dword;
|
||||
size = sizeof(dword);
|
||||
if (RegQueryValueExW(hKey, NameSrvQueryTimeoutW, NULL, NULL,
|
||||
(LPBYTE)&dword, &size) == ERROR_SUCCESS && dword >= MIN_QUERY_TIMEOUT
|
||||
&& dword <= MAX_QUERY_TIMEOUT)
|
||||
(LPBYTE)&dword, &size) == ERROR_SUCCESS && dword >= MIN_QUERY_TIMEOUT)
|
||||
gWINSQueryTimeout = dword;
|
||||
size = sizeof(gScopeID) - 1;
|
||||
if (RegQueryValueExW(hKey, ScopeIDW, NULL, NULL, (LPBYTE)gScopeID + 1, &size)
|
||||
|
|
|
@ -97,7 +97,7 @@ NET_API_STATUS WINAPI NetServerEnumEx(
|
|||
*/
|
||||
NET_API_STATUS WINAPI NetServerGetInfo(LMSTR servername, DWORD level, LPBYTE* bufptr)
|
||||
{
|
||||
FIXME("stub (%p, %d, %p)\n", servername, level, bufptr);
|
||||
FIXME("stub (%s, %d, %p)\n", debugstr_w(servername), level, bufptr);
|
||||
return ERROR_ACCESS_DENIED;
|
||||
}
|
||||
|
||||
|
|
|
@ -88,7 +88,7 @@
|
|||
@ stub NetErrorLogRead
|
||||
@ stub NetErrorLogWrite
|
||||
@ stub NetFileClose
|
||||
@ stub NetFileEnum
|
||||
@ stdcall NetFileEnum(wstr wstr wstr long ptr long ptr ptr ptr)
|
||||
@ stub NetFileGetInfo
|
||||
@ stub NetGetAnyDCName
|
||||
@ stdcall NetGetDCName(wstr wstr ptr)
|
||||
|
@ -99,7 +99,7 @@
|
|||
@ stub NetGroupDel
|
||||
@ stub NetGroupDelUser
|
||||
@ stdcall NetGroupEnum(wstr long ptr long ptr ptr ptr)
|
||||
@ stub NetGroupGetInfo
|
||||
@ stdcall NetGroupGetInfo(wstr wstr long ptr)
|
||||
@ stub NetGroupGetUsers
|
||||
@ stub NetGroupSetInfo
|
||||
@ stub NetGroupSetUsers
|
||||
|
|
|
@ -113,3 +113,16 @@ NET_API_STATUS WINAPI NetShareAdd(LMSTR servername,
|
|||
FIXME("Stub (%s %d %p %p)\n", debugstr_w(servername), level, buf, parm_err);
|
||||
return ERROR_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
* NetFileEnum (NETAPI32.@)
|
||||
*/
|
||||
NET_API_STATUS WINAPI NetFileEnum(
|
||||
LPWSTR ServerName, LPWSTR BasePath, LPWSTR UserName,
|
||||
DWORD Level, LPBYTE* BufPtr, DWORD PrefMaxLen,
|
||||
LPDWORD EntriesRead, LPDWORD TotalEntries, PDWORD_PTR ResumeHandle)
|
||||
{
|
||||
FIXME("(%s, %s, %s, %u): stub\n", debugstr_w(ServerName), debugstr_w(BasePath),
|
||||
debugstr_w(UserName), Level);
|
||||
return ERROR_NOT_SUPPORTED;
|
||||
}
|
||||
|
|
|
@ -123,20 +123,24 @@ typedef struct _CONNECTION_INFO_1 {
|
|||
LPWSTR coni1_username;
|
||||
LPWSTR coni1_netname;
|
||||
} CONNECTION_INFO_1,*PCONNECTION_INFO_1,*LPCONNECTION_INFO_1;
|
||||
NET_API_STATUS WINAPI NetShareAdd(LPWSTR,DWORD,PBYTE,PDWORD);
|
||||
NET_API_STATUS WINAPI NetShareEnum(LPWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
|
||||
NET_API_STATUS WINAPI NetShareEnumSticky(LPWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD resume_handle);
|
||||
NET_API_STATUS WINAPI NetShareGetInfo(LPWSTR,LPWSTR,DWORD,PBYTE*);
|
||||
NET_API_STATUS WINAPI NetShareSetInfo(LPWSTR,LPWSTR,DWORD,PBYTE,PDWORD);
|
||||
NET_API_STATUS WINAPI NetShareDel(LPWSTR,LPWSTR,DWORD);
|
||||
NET_API_STATUS WINAPI NetShareDelSticky(LPWSTR,LPWSTR,DWORD);
|
||||
NET_API_STATUS WINAPI NetShareCheck(LPWSTR,LPWSTR,PDWORD);
|
||||
NET_API_STATUS WINAPI NetSessionEnum(LPWSTR,LPWSTR,LPWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
|
||||
NET_API_STATUS WINAPI NetSessionDel(LPWSTR,LPWSTR,LPWSTR);
|
||||
NET_API_STATUS WINAPI NetSessionGetInfo(LPWSTR,LPWSTR,LPWSTR,DWORD,PBYTE*);
|
||||
|
||||
NET_API_STATUS WINAPI NetShareAdd(LMSTR,DWORD,LPBYTE,LPDWORD);
|
||||
NET_API_STATUS WINAPI NetShareCheck(LMSTR,LMSTR,LPDWORD);
|
||||
NET_API_STATUS WINAPI NetShareDel(LMSTR,LMSTR,DWORD);
|
||||
NET_API_STATUS WINAPI NetShareDelEx(LMSTR,DWORD,LPBYTE);
|
||||
NET_API_STATUS WINAPI NetShareDelSticky(LMSTR,LMSTR,DWORD);
|
||||
NET_API_STATUS WINAPI NetShareEnum(LMSTR,DWORD,LPBYTE*,DWORD,LPDWORD,LPDWORD,LPDWORD);
|
||||
NET_API_STATUS WINAPI NetShareEnumSticky(LMSTR,DWORD,LPBYTE*,DWORD,LPDWORD,LPDWORD,LPDWORD);
|
||||
NET_API_STATUS WINAPI NetShareGetInfo(LMSTR,LMSTR,DWORD,LPBYTE*);
|
||||
NET_API_STATUS WINAPI NetShareSetInfo(LMSTR,LMSTR,DWORD,LPBYTE,LPDWORD);
|
||||
|
||||
NET_API_STATUS WINAPI NetSessionDel(LMSTR,LMSTR,LMSTR);
|
||||
NET_API_STATUS WINAPI NetSessionEnum(LMSTR,LMSTR,LMSTR,DWORD,LPBYTE*,DWORD,LPDWORD,LPDWORD,LPDWORD);
|
||||
NET_API_STATUS WINAPI NetSessionGetInfo(LMSTR,LMSTR,LMSTR,DWORD,LPBYTE*);
|
||||
|
||||
NET_API_STATUS WINAPI NetConnectionEnum(LPWSTR,LPWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
|
||||
NET_API_STATUS WINAPI NetFileClose(LPWSTR,DWORD);
|
||||
NET_API_STATUS WINAPI NetFileEnum(LPWSTR,LPWSTR,LPWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
|
||||
NET_API_STATUS WINAPI NetFileEnum(LMSTR,LMSTR,LMSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD_PTR);
|
||||
NET_API_STATUS WINAPI NetFileGetInfo(LPWSTR,DWORD,DWORD,PBYTE*);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue