Author: winesync
Date: Thu Nov 29 14:02:32 2007
New Revision: 30874
URL:
http://svn.reactos.org/svn/reactos?rev=30874&view=rev
Log:
Autosyncing with Wine HEAD
Modified:
trunk/reactos/dll/win32/netapi32/access.c
trunk/reactos/dll/win32/netapi32/apibuf.c
trunk/reactos/dll/win32/netapi32/ds.c
trunk/reactos/dll/win32/netapi32/netapi32.c
trunk/reactos/dll/win32/netapi32/netapi32.rbuild
trunk/reactos/dll/win32/netapi32/netapi32.spec
trunk/reactos/dll/win32/netapi32/share.c
trunk/reactos/dll/win32/netapi32/wksta.c
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 (original)
+++ trunk/reactos/dll/win32/netapi32/access.c Thu Nov 29 14:02:32 2007
@@ -29,6 +29,7 @@
#include "lmaccess.h"
#include "lmapibuf.h"
#include "lmerr.h"
+#include "lmuse.h"
#include "ntsecapi.h"
#include "wine/debug.h"
#include "wine/unicode.h"
@@ -131,7 +132,7 @@
/* Fall through */
case 2:
FIXME("Level 2 not implemented.\n");
- /* Fall throught */
+ /* Fall through */
case 1:
{
PUSER_INFO_1 ui = (PUSER_INFO_1) bufptr;
@@ -177,13 +178,8 @@
break;
}
- if(su)
- {
- HeapFree(GetProcessHeap(), 0, su->home_dir);
- HeapFree(GetProcessHeap(), 0, su->user_comment);
- HeapFree(GetProcessHeap(), 0, su->user_logon_script_path);
- HeapFree(GetProcessHeap(), 0, su);
- }
+ HeapFree(GetProcessHeap(), 0, su);
+
return status;
}
@@ -448,7 +444,7 @@
name_sz = lstrlenW(sAdminUserName);
comment_sz = 1;
full_name_sz = 1;
-
+
*pdwSize = sizeof(NET_DISPLAY_USER);
*pdwSize += (name_sz + comment_sz + full_name_sz) * sizeof(WCHAR);
NetApiBufferAllocate(*pdwSize, (LPVOID *) buf);
@@ -487,7 +483,7 @@
name_sz = lstrlenW(sGuestUserName);
comment_sz = 1;
full_name_sz = 1;
-
+
*pdwSize = sizeof(NET_DISPLAY_USER);
*pdwSize += (name_sz + comment_sz + full_name_sz) * sizeof(WCHAR);
NetApiBufferAllocate(*pdwSize, (LPVOID *) buf);
@@ -666,7 +662,7 @@
{
FIXME("(%s, %s, %p) stub!\n", debugstr_w(servername),
debugstr_w(domainname), bufptr);
- return NERR_DCNotFound; /* say we can't find a domain controller */
+ return NERR_DCNotFound; /* say we can't find a domain controller */
}
@@ -684,7 +680,7 @@
* USER_MODALS_INFO_0 struct.
* 1 Return logon server and domain controller information. bufptr
* points to a USER_MODALS_INFO_1 struct.
- * 2 Return domain name and identifier. bufptr points to a
+ * 2 Return domain name and identifier. bufptr points to a
* USER_MODALS_INFO_2 struct.
* 3 Return lockout information. bufptr points to a USER_MODALS_INFO_3
* struct.
@@ -692,7 +688,7 @@
*
* RETURNS
* Success: NERR_Success.
- * Failure:
+ * Failure:
* ERROR_ACCESS_DENIED - the user does not have access to the info.
* NERR_InvalidComputer - computer name is invalid.
*/
@@ -700,7 +696,7 @@
LPCWSTR szServer, DWORD level, LPBYTE *pbuffer)
{
TRACE("(%s %d %p)\n", debugstr_w(szServer), level, pbuffer);
-
+
switch (level)
{
case 0:
@@ -779,7 +775,7 @@
LsaFreeMemory(domainInfo);
break;
- }
+ }
case 3:
/* return lockout information */
FIXME("level 3 not implemented!\n");
@@ -833,7 +829,7 @@
return NERR_Success;
}
-NET_API_STATUS NetUseAdd(LMSTR servername, DWORD level, LPBYTE bufptr, LPDWORD parm_err)
+NET_API_STATUS WINAPI NetUseAdd(LMSTR servername, DWORD level, LPBYTE bufptr, LPDWORD
parm_err)
{
FIXME("%s %d %p %p stub\n", debugstr_w(servername), level, bufptr,
parm_err);
return NERR_Success;
Modified: trunk/reactos/dll/win32/netapi32/apibuf.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/apibuf.…
==============================================================================
--- trunk/reactos/dll/win32/netapi32/apibuf.c (original)
+++ trunk/reactos/dll/win32/netapi32/apibuf.c Thu Nov 29 14:02:32 2007
@@ -62,15 +62,15 @@
LPVOID* NewBuffer)
{
TRACE("(%p, %d, %p)\n", OldBuffer, NewByteCount, NewBuffer);
- if (NewByteCount)
+ if (NewByteCount)
{
if (OldBuffer)
*NewBuffer = HeapReAlloc(GetProcessHeap(), 0, OldBuffer, NewByteCount);
else
*NewBuffer = HeapAlloc(GetProcessHeap(), 0, NewByteCount);
return *NewBuffer ? NERR_Success : GetLastError();
- }
- else
+ }
+ else
{
if (!HeapFree(GetProcessHeap(), 0, OldBuffer)) return GetLastError();
*NewBuffer = 0;
Modified: trunk/reactos/dll/win32/netapi32/ds.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/ds.c?re…
==============================================================================
--- trunk/reactos/dll/win32/netapi32/ds.c (original)
+++ trunk/reactos/dll/win32/netapi32/ds.c Thu Nov 29 14:02:32 2007
@@ -78,7 +78,7 @@
*
* PARAMS
* lpServer [I] Pointer to UNICODE string with Computername
- * InfoLevel [I] Type of data to retrieve
+ * InfoLevel [I] Type of data to retrieve
* Buffer [O] Pointer to to the requested data
*
* RETURNS
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 (original)
+++ trunk/reactos/dll/win32/netapi32/netapi32.c Thu Nov 29 14:02:32 2007
@@ -53,14 +53,14 @@
* NetServerEnum (NETAPI32.@)
*/
NET_API_STATUS WINAPI NetServerEnum(
- LPCWSTR servername,
+ LMCSTR servername,
DWORD level,
LPBYTE* bufptr,
DWORD prefmaxlen,
LPDWORD entriesread,
LPDWORD totalentries,
DWORD servertype,
- LPCWSTR domain,
+ LMCSTR domain,
LPDWORD resume_handle
)
{
@@ -75,15 +75,15 @@
* NetServerEnumEx (NETAPI32.@)
*/
NET_API_STATUS WINAPI NetServerEnumEx(
- LPCWSTR ServerName,
+ LMCSTR ServerName,
DWORD Level,
LPBYTE *Bufptr,
DWORD PrefMaxlen,
LPDWORD EntriesRead,
LPDWORD totalentries,
DWORD servertype,
- LPCWSTR domain,
- LPCWSTR FirstNameToReturn)
+ LMCSTR domain,
+ LMCSTR FirstNameToReturn)
{
FIXME("Stub (%s %d %p %d %p %p %d %s %p)\n", debugstr_w(ServerName),
Level, Bufptr, PrefMaxlen, EntriesRead, totalentries, servertype,
@@ -105,7 +105,7 @@
/************************************************************
* NetStatisticsGet (NETAPI32.@)
*/
-NET_API_STATUS WINAPI NetStatisticsGet(LPWSTR server, LPWSTR service,
+NET_API_STATUS WINAPI NetStatisticsGet(LMSTR server, LMSTR service,
DWORD level, DWORD options,
LPBYTE *bufptr)
{
@@ -157,3 +157,11 @@
}
return ret;
}
+
+NET_API_STATUS WINAPI NetUseEnum(LMSTR server, DWORD level, LPBYTE* bufptr, DWORD
prefmaxsize,
+ LPDWORD entriesread, LPDWORD totalentries, LPDWORD
resumehandle)
+{
+ FIXME("stub (%p, %d, %p, %d, %p, %p, %p)\n", server, level, bufptr,
prefmaxsize,
+ entriesread, totalentries, resumehandle);
+ return ERROR_NOT_SUPPORTED;
+}
Modified: trunk/reactos/dll/win32/netapi32/netapi32.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/netapi3…
==============================================================================
--- trunk/reactos/dll/win32/netapi32/netapi32.rbuild (original)
+++ trunk/reactos/dll/win32/netapi32/netapi32.rbuild Thu Nov 29 14:02:32 2007
@@ -1,13 +1,12 @@
+<?xml version="1.0"?>
+<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
<module name="netapi32" type="win32dll"
baseaddress="${BASEADDRESS_NETAPI32}" installbase="system32"
installname="netapi32.dll" allowwarnings="true">
<importlibrary definition="netapi32.spec.def" />
<include base="netapi32">.</include>
<include base="ReactOS">include/reactos/wine</include>
- <define name="__REACTOS__" />
<define name="__WINESRC__" />
- <define name="__USE_W32API" />
- <define name="_WIN32_IE">0x600</define>
- <define name="_WIN32_WINNT">0x501</define>
- <define name="WINVER">0x501</define>
+ <define name="WINVER">0x600</define>
+ <define name="_WIN32_WINNT">0x600</define>
<library>wine</library>
<library>iphlpapi</library>
<library>ws2_32</library>
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 (original)
+++ trunk/reactos/dll/win32/netapi32/netapi32.spec Thu Nov 29 14:02:32 2007
@@ -199,7 +199,7 @@
@ stdcall NetStatisticsGet(wstr wstr long long ptr)
@ stdcall NetUseAdd(wstr long ptr ptr)
@ stub NetUseDel
-@ stub NetUseEnum
+@ stdcall NetUseEnum(wstr long ptr long ptr ptr ptr)
@ stub NetUseGetInfo
@ stdcall NetUserAdd(wstr long ptr ptr)
@ stdcall NetUserChangePassword(wstr wstr wstr wstr)
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 (original)
+++ trunk/reactos/dll/win32/netapi32/share.c Thu Nov 29 14:02:32 2007
@@ -47,8 +47,8 @@
* NERR_InvalidComputer Invalid computer name
* NERR_UserNotFound User name could not be found.
*/
-NET_API_STATUS WINAPI NetSessionEnum(LPWSTR servername, LPWSTR UncClientName,
- LPWSTR username, DWORD level, LPBYTE* bufptr, DWORD prefmaxlen, LPDWORD entriesread,
+NET_API_STATUS WINAPI NetSessionEnum(LMSTR servername, LMSTR UncClientName,
+ LMSTR username, DWORD level, LPBYTE* bufptr, DWORD prefmaxlen, LPDWORD entriesread,
LPDWORD totalentries, LPDWORD resume_handle)
{
FIXME("Stub (%s %s %s %d %p %d %p %p %p)\n", debugstr_w(servername),
@@ -75,7 +75,7 @@
* On failure it returns a system error code (FIXME: find out which)
*
*/
-NET_API_STATUS WINAPI NetShareEnum( LPWSTR servername, DWORD level, LPBYTE* bufptr,
+NET_API_STATUS WINAPI NetShareEnum( LMSTR servername, DWORD level, LPBYTE* bufptr,
DWORD prefmaxlen, LPDWORD entriesread, LPDWORD totalentries, LPDWORD resume_handle)
{
FIXME("Stub (%s %d %p %d %p %p %p)\n", debugstr_w(servername), level,
bufptr,
Modified: trunk/reactos/dll/win32/netapi32/wksta.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/wksta.c…
==============================================================================
--- trunk/reactos/dll/win32/netapi32/wksta.c (original)
+++ trunk/reactos/dll/win32/netapi32/wksta.c Thu Nov 29 14:02:32 2007
@@ -46,7 +46,7 @@
*
* Checks whether the server name indicates local machine.
*/
-BOOL NETAPI_IsLocalComputer(LPCWSTR ServerName)
+BOOL NETAPI_IsLocalComputer(LMCSTR ServerName)
{
if (!ServerName)
{
@@ -141,7 +141,7 @@
/***********************************************************************
* NetWkstaTransportEnum (NETAPI32.@)
*/
-
+
struct WkstaTransportEnumData
{
UCHAR n_adapt;
@@ -189,15 +189,15 @@
if (enumData->n_read < spaceFor)
{
PWKSTA_TRANSPORT_INFO_0 ti;
- LPWSTR transport_name, transport_addr;
+ LMSTR transport_name, transport_addr;
MIB_IFROW ifRow;
ti = (PWKSTA_TRANSPORT_INFO_0)(*(enumData->pbuf) +
enumData->n_read * sizeof(WKSTA_TRANSPORT_INFO_0));
- transport_name = (LPWSTR)(*(enumData->pbuf) +
+ transport_name = (LMSTR)(*(enumData->pbuf) +
totalLANAs * sizeof(WKSTA_TRANSPORT_INFO_0) +
enumData->n_read * MAX_TRANSPORT_NAME * sizeof(WCHAR));
- transport_addr = (LPWSTR)(*(enumData->pbuf) +
+ transport_addr = (LMSTR)(*(enumData->pbuf) +
totalLANAs * (sizeof(WKSTA_TRANSPORT_INFO_0) +
MAX_TRANSPORT_NAME * sizeof(WCHAR)) +
enumData->n_read * MAX_TRANSPORT_ADDR * sizeof(WCHAR));
@@ -246,14 +246,14 @@
/**********************************************************************/
-NET_API_STATUS WINAPI
-NetWkstaTransportEnum(LPWSTR ServerName, DWORD level, PBYTE* pbuf,
+NET_API_STATUS WINAPI
+NetWkstaTransportEnum(LMSTR ServerName, DWORD level, PBYTE* pbuf,
DWORD prefmaxlen, LPDWORD read_entries,
PDWORD total_entries, PDWORD hresume)
{
NET_API_STATUS ret;
- TRACE(":%s, 0x%08x, %p, 0x%08x, %p, %p, %p\n", debugstr_w(ServerName),
+ TRACE(":%s, 0x%08x, %p, 0x%08x, %p, %p, %p\n", debugstr_w(ServerName),
level, pbuf, prefmaxlen, read_entries, total_entries,hresume);
if (!NETAPI_IsLocalComputer(ServerName))
{
@@ -305,7 +305,7 @@
/************************************************************
* NetWkstaUserGetInfo (NETAPI32.@)
*/
-NET_API_STATUS WINAPI NetWkstaUserGetInfo(LPWSTR reserved, DWORD level,
+NET_API_STATUS WINAPI NetWkstaUserGetInfo(LMSTR reserved, DWORD level,
PBYTE* bufptr)
{
TRACE("(%s, %d, %p)\n", debugstr_w(reserved), level, bufptr);
@@ -321,7 +321,7 @@
(LPVOID *) bufptr);
ui = (PWKSTA_USER_INFO_0) *bufptr;
- ui->wkui0_username = (LPWSTR) (*bufptr + sizeof(WKSTA_USER_INFO_0));
+ ui->wkui0_username = (LMSTR) (*bufptr + sizeof(WKSTA_USER_INFO_0));
/* get data */
if (!GetUserNameW(ui->wkui0_username, &dwSize))
@@ -381,13 +381,13 @@
oth_domains_sz + logon_server_sz) * sizeof(WCHAR),
(LPVOID *) bufptr);
ui = (WKSTA_USER_INFO_1 *) *bufptr;
- ui->wkui1_username = (LPWSTR) (*bufptr + sizeof(WKSTA_USER_INFO_1));
- ui->wkui1_logon_domain = (LPWSTR) (
+ ui->wkui1_username = (LMSTR) (*bufptr + sizeof(WKSTA_USER_INFO_1));
+ ui->wkui1_logon_domain = (LMSTR) (
((PBYTE) ui->wkui1_username) + username_sz * sizeof(WCHAR));
- ui->wkui1_oth_domains = (LPWSTR) (
+ ui->wkui1_oth_domains = (LMSTR) (
((PBYTE) ui->wkui1_logon_domain) +
logon_domain_sz * sizeof(WCHAR));
- ui->wkui1_logon_server = (LPWSTR) (
+ ui->wkui1_logon_server = (LMSTR) (
((PBYTE) ui->wkui1_oth_domains) +
oth_domains_sz * sizeof(WCHAR));
@@ -418,7 +418,7 @@
(LPVOID *) bufptr);
ui = (PWKSTA_USER_INFO_1101) *bufptr;
- ui->wkui1101_oth_domains = (LPWSTR)(ui + 1);
+ ui->wkui1101_oth_domains = (LMSTR)(ui + 1);
/* get data */
ui->wkui1101_oth_domains[0] = 0;
@@ -469,7 +469,7 @@
return ERROR_INVALID_PARAMETER;
}
-NET_API_STATUS WINAPI NetWkstaGetInfo( LPWSTR servername, DWORD level,
+NET_API_STATUS WINAPI NetWkstaGetInfo( LMSTR servername, DWORD level,
LPBYTE* bufptr)
{
NET_API_STATUS ret;
@@ -497,7 +497,7 @@
LSA_OBJECT_ATTRIBUTES ObjectAttributes;
LSA_HANDLE PolicyHandle;
NTSTATUS NtStatus;
-
+
computerNameLen = MAX_COMPUTERNAME_LENGTH + 1;
GetComputerNameW(computerName, &computerNameLen);
computerNameLen++; /* include NULL terminator */
@@ -524,7 +524,7 @@
OSVERSIONINFOW verInfo;
info->wki102_platform_id = PLATFORM_ID_NT;
- info->wki102_computername = (LPWSTR)(*bufptr +
+ info->wki102_computername = (LMSTR)(*bufptr +
sizeof(WKSTA_INFO_102));
memcpy(info->wki102_computername, computerName,
computerNameLen * sizeof(WCHAR));