Author: cwittich
Date: Sun Oct 25 20:24:08 2009
New Revision: 43750
URL:
http://svn.reactos.org/svn/reactos?rev=43750&view=rev
Log:
-sync netapi32 with wine 1.1.32
Modified:
trunk/reactos/dll/win32/netapi32/access.c
trunk/reactos/dll/win32/netapi32/nbt.c
trunk/reactos/dll/win32/netapi32/netapi32.c
trunk/reactos/dll/win32/netapi32/netapi32.spec
trunk/reactos/dll/win32/netapi32/share.c
trunk/reactos/include/psdk/lmshare.h
Modified: trunk/reactos/dll/win32/netapi32/access.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/access.…
==============================================================================
--- trunk/reactos/dll/win32/netapi32/access.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netapi32/access.c [iso-8859-1] Sun Oct 25 20:24:08 2009
@@ -112,7 +112,7 @@
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 @@
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 @@
/* get data */
dwSize = UNLEN + 1;
- NetApiBufferAllocate(dwSize, (LPVOID *) &name);
+ NetApiBufferAllocate(dwSize * sizeof(WCHAR), (LPVOID *) &name);
if (!GetUserNameW(name, &dwSize))
{
NetApiBufferFree(name);
@@ -728,6 +728,16 @@
{
FIXME("(%s, %d, %p, %d, %p, %p, %p) stub!\n", debugstr_w(servername),
level, bufptr, prefmaxlen, entriesread, totalentries, resume_handle);
+ 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;
}
Modified: trunk/reactos/dll/win32/netapi32/nbt.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/nbt.c?r…
==============================================================================
--- trunk/reactos/dll/win32/netapi32/nbt.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netapi32/nbt.c [iso-8859-1] Sun Oct 25 20:24:08 2009
@@ -1478,8 +1478,7 @@
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 @@
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)
Modified: trunk/reactos/dll/win32/netapi32/netapi32.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/netapi3…
==============================================================================
--- trunk/reactos/dll/win32/netapi32/netapi32.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netapi32/netapi32.c [iso-8859-1] Sun Oct 25 20:24:08 2009
@@ -97,7 +97,7 @@
*/
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;
}
Modified: trunk/reactos/dll/win32/netapi32/netapi32.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/netapi3…
==============================================================================
--- trunk/reactos/dll/win32/netapi32/netapi32.spec [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netapi32/netapi32.spec [iso-8859-1] Sun Oct 25 20:24:08 2009
@@ -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
Modified: trunk/reactos/dll/win32/netapi32/share.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/share.c…
==============================================================================
--- trunk/reactos/dll/win32/netapi32/share.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netapi32/share.c [iso-8859-1] Sun Oct 25 20:24:08 2009
@@ -113,3 +113,16 @@
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;
+}
Modified: trunk/reactos/include/psdk/lmshare.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/lmshare.h?rev…
==============================================================================
--- trunk/reactos/include/psdk/lmshare.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/lmshare.h [iso-8859-1] Sun Oct 25 20:24:08 2009
@@ -123,20 +123,24 @@
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
}