Commit 2693eb9a authored by Andriy Palamarchuk's avatar Andriy Palamarchuk Committed by Alexandre Julliard

Implemented NetQueryDisplayInformation, NetUserGetInfo, created

conformance tests, other netapi32 bug fixes and improvements.
parent e30b0780
......@@ -10,7 +10,9 @@ LDDLLFLAGS = @LDDLLFLAGS@
SYMBOLFILE = $(MODULE).tmp.o
C_SRCS = \
access.c \
apibuf.c \
browsr.c \
netapi32.c \
wksta.c
......
......@@ -83,12 +83,3 @@ NET_API_STATUS WINAPI NetApiBufferSize(LPVOID Buffer, LPDWORD ByteCount)
return NERR_Success;
}
/************************************************************
* NetapipBufferAllocate (NETAPI32.@)
*/
NET_API_STATUS WINAPI NetapipBufferAllocate(DWORD ByteCount, LPVOID* Buffer)
{
TRACE("(%ld, %p)\n", ByteCount, Buffer);
return NetApiBufferAllocate(ByteCount, Buffer);
}
/*
* Copyright 2002 Andriy Palamarchuk
*
* netapi32 browser functions
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <winbase.h>
#include <winerror.h>
#include <lmcons.h>
#include <lmbrowsr.h>
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(netapi32);
/************************************************************
* I_BrowserSetNetlogonState (NETAPI32.@)
*/
NET_API_STATUS WINAPI I_BrowserSetNetlogonState(
LPWSTR ServerName, LPWSTR DomainName, LPWSTR EmulatedServerName,
DWORD Role)
{
return ERROR_NOT_SUPPORTED;
}
/************************************************************
* I_BrowserQueryEmulatedDomains (NETAPI32.@)
*/
NET_API_STATUS WINAPI I_BrowserQueryEmulatedDomains(
LPWSTR ServerName, PBROWSER_EMULATED_DOMAIN *EmulatedDomains,
LPDWORD EntriesRead)
{
return ERROR_NOT_SUPPORTED;
}
......@@ -2,13 +2,13 @@ init NETAPI32_LibMain
@ stub I_BrowserDebugCall
@ stub I_BrowserDebugTrace
@ stub I_BrowserQueryEmulatedDomains
@ stdcall I_BrowserQueryEmulatedDomains(wstr ptr ptr) I_BrowserQueryEmulatedDomains
@ stub I_BrowserQueryOtherDomains
@ stub I_BrowserQueryStatistics
@ stub I_BrowserResetNetlogonState
@ stub I_BrowserResetStatistics
@ stub I_BrowserServerEnum
@ stub I_BrowserSetNetlogonState
@ stdcall I_BrowserSetNetlogonState(wstr wstr wstr long) I_BrowserSetNetlogonState
@ stub I_NetAccountDeltas
@ stub I_NetAccountSync
@ stub I_NetDatabaseDeltas
......@@ -103,7 +103,7 @@ init NETAPI32_LibMain
@ stub NetMessageNameDel
@ stub NetMessageNameEnum
@ stub NetMessageNameGetInfo
@ stub NetQueryDisplayInformation
@ stdcall NetQueryDisplayInformation(wstr long long long long ptr ptr) NetQueryDisplayInformation
@ stub NetRemoteComputerSupports
@ stub NetRemoteTOD
@ stub NetReplExportDirAdd
......@@ -190,7 +190,7 @@ init NETAPI32_LibMain
@ stub NetUserDel
@ stub NetUserEnum
@ stub NetUserGetGroups
@ stub NetUserGetInfo
@ stdcall NetUserGetInfo(wstr wstr long ptr) NetUserGetInfo
@ stub NetUserGetLocalGroups
@ stub NetUserModalsGet
@ stub NetUserModalsSet
......@@ -204,7 +204,7 @@ init NETAPI32_LibMain
@ stub NetWkstaUserEnum
@ stdcall NetWkstaUserGetInfo(wstr long ptr) NetWkstaUserGetInfo
@ stub NetWkstaUserSetInfo
@ stdcall NetapipBufferAllocate(long ptr) NetapipBufferAllocate
@ stdcall NetapipBufferAllocate(long ptr) NetApiBufferAllocate
@ stdcall Netbios(ptr) Netbios
@ stub NetpAccessCheck
@ stub NetpAccessCheckAndAudit
......@@ -221,7 +221,7 @@ init NETAPI32_LibMain
@ stub NetpCreateSecurityObject
@ stub NetpDbgDisplayServerInfo
@ stub NetpDbgPrint
@ stub NetpDeleteSecurityObject
@ forward NetpDeleteSecurityObject ntdll.RtlDeleteSecurityObject
@ stdcall NetpGetComputerName(ptr) NetpGetComputerName
@ stub NetpGetConfigBool
@ stub NetpGetConfigDword
......@@ -231,7 +231,7 @@ init NETAPI32_LibMain
@ stub NetpGetFileSecurity
@ stub NetpGetPrivilege
@ stub NetpHexDump
@ stub NetpInitOemString
@ forward NetpInitOemString ntdll.RtlInitAnsiString
@ stub NetpIsRemote
@ stub NetpIsUncComputerNameValid
@ stub NetpLocalTimeZoneOffset
......
/*
* Copyright 2002 Andriy Palamarchuk
*
* netapi32 internal functions.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, writ
e to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __WINE_NETAPI32_MISC_H
#define __WINE_NETAPI32_MISC_H
extern BOOL NETAPI_IsLocalComputer(LPCWSTR ServerName);
#define NETAPI_ForceLocalComputer(ServerName, FailureCode) \
if (!NETAPI_IsLocalComputer(ServerName)) \
{ \
FIXME("Action Implemented for local computer only. " \
"Requested for server %s\n", debugstr_w(ServerName)); \
return FailureCode; \
}
#endif
Makefile
access.ok
apibuf.ok
netapi32_test.exe.spec.c
testlist.c
......
......@@ -3,9 +3,10 @@ TOPOBJDIR = ../../..
SRCDIR = @srcdir@
VPATH = @srcdir@
TESTDLL = netapi32.dll
IMPORTS = netapi32
IMPORTS = netapi32 advapi32
CTESTS = \
access.c \
apibuf.c \
wksta.c
......
/*
* Copyright 2002 Andriy Palamarchuk
*
* Conformance test of the access functions.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <wine/test.h>
#include <winbase.h>
#include <winerror.h>
#include <lmaccess.h>
#include <lmerr.h>
#include <lmapibuf.h>
WCHAR user_name[UNLEN + 1];
WCHAR computer_name[MAX_COMPUTERNAME_LENGTH + 1];
const WCHAR sAdminUserName[] = {'A','d','m','i','n','i','s','t','r','a','t',
'o','r',0};
const WCHAR sGuestUserName[] = {'G','u','e','s','t',0};
const WCHAR sNonexistentUser[] = {'N','o','n','e','x','i','s','t','e','n','t',' ',
'U','s','e','r',0};
const WCHAR sBadNetPath[] = {'\\','\\','B','a',' ',' ','p','a','t','h',0};
const WCHAR sInvalidName[] = {'\\',0};
const WCHAR sInvalidName2[] = {'\\','\\',0};
const WCHAR sEmptyStr[] = { 0 };
void init_access_tests(void)
{
DWORD dwSize;
user_name[0] = 0;
dwSize = sizeof(user_name);
ok(GetUserNameW(user_name, &dwSize), "User Name Retrieved");
computer_name[0] = 0;
dwSize = sizeof(computer_name);
ok(GetComputerNameW(computer_name, &dwSize), "Computer Name Retrieved");
}
void run_usergetinfo_tests(void)
{
PUSER_INFO_0 ui0 = NULL;
PUSER_INFO_10 ui10 = NULL;
DWORD dwSize;
/* Level 0 */
ok(NetUserGetInfo(NULL, sAdminUserName, 0, (LPBYTE *)&ui0) == NERR_Success,
"NetUserGetInfo is successful");
ok(!lstrcmpW(sAdminUserName, ui0->usri0_name), "This is really user name");
NetApiBufferSize(ui0, &dwSize);
ok(dwSize >= (sizeof(USER_INFO_0) +
(lstrlenW(ui0->usri0_name) + 1) * sizeof(WCHAR)),
"Is allocated with NetApiBufferAllocate");
/* Level 10 */
ok(NetUserGetInfo(NULL, sAdminUserName, 10, (LPBYTE *)&ui10) == NERR_Success,
"NetUserGetInfo is successful");
ok(!lstrcmpW(sAdminUserName, ui10->usri10_name), "This is really user name");
NetApiBufferSize(ui10, &dwSize);
ok(dwSize >= (sizeof(USER_INFO_10) +
(lstrlenW(ui10->usri10_name) + 1 +
lstrlenW(ui10->usri10_comment) + 1 +
lstrlenW(ui10->usri10_usr_comment) + 1 +
lstrlenW(ui10->usri10_full_name) + 1) * sizeof(WCHAR)),
"Is allocated with NetApiBufferAllocate");
NetApiBufferFree(ui0);
NetApiBufferFree(ui10);
/* errors handling */
ok(NetUserGetInfo(NULL, sAdminUserName, 10000, (LPBYTE *)&ui0) == ERROR_INVALID_LEVEL,
"Invalid Level");
ok(NetUserGetInfo(NULL, sNonexistentUser, 0, (LPBYTE *)&ui0) == NERR_UserNotFound,
"Invalid User Name");
todo_wine {
/* FIXME - Currently Wine can't verify whether the network path is good or bad */
ok(NetUserGetInfo(sBadNetPath, sAdminUserName, 0, (LPBYTE *)&ui0) == ERROR_BAD_NETPATH,
"Bad Network Path");
}
ok(NetUserGetInfo(sEmptyStr, sAdminUserName, 0, (LPBYTE *)&ui0) == ERROR_BAD_NETPATH,
"Bad Network Path");
ok(NetUserGetInfo(sInvalidName, sAdminUserName, 0, (LPBYTE *)&ui0) == ERROR_INVALID_NAME,
"Invalid Server Name");
ok(NetUserGetInfo(sInvalidName2, sAdminUserName, 0, (LPBYTE *)&ui0) == ERROR_INVALID_NAME,
"Invalid Server Name");
}
/* checks Level 1 of NetQueryDisplayInformation */
void run_querydisplayinformation1_tests(void)
{
PNET_DISPLAY_USER Buffer, rec;
DWORD Result, EntryCount;
DWORD i = 0;
BOOL hasAdmin = FALSE;
BOOL hasGuest = FALSE;
do
{
Result = NetQueryDisplayInformation(
NULL, 1, i, 1000, MAX_PREFERRED_LENGTH, &EntryCount,
(PVOID *)&Buffer);
ok((Result == ERROR_SUCCESS) || (Result == ERROR_MORE_DATA),
"Information Retrieved");
rec = Buffer;
for(; EntryCount > 0; EntryCount--)
{
if (!lstrcmpW(rec->usri1_name, sAdminUserName))
{
ok(!hasAdmin, "One admin user");
ok(rec->usri1_flags & UF_SCRIPT, "UF_SCRIPT flag is set");
ok(rec->usri1_flags & UF_NORMAL_ACCOUNT, "UF_NORMAL_ACCOUNT flag is set");
hasAdmin = TRUE;
}
else if (!lstrcmpW(rec->usri1_name, sGuestUserName))
{
ok(!hasGuest, "One guest record");
ok(rec->usri1_flags & UF_SCRIPT, "UF_SCRIPT flag is set");
ok(rec->usri1_flags & UF_NORMAL_ACCOUNT, "UF_NORMAL_ACCOUNT flag is set");
hasGuest = TRUE;
}
i = rec->usri1_next_index;
rec++;
}
NetApiBufferFree(Buffer);
} while (Result == ERROR_MORE_DATA);
ok(hasAdmin, "Has Administrator account");
ok(hasGuest, "Has Guest account");
}
START_TEST(access)
{
init_access_tests();
run_usergetinfo_tests();
run_querydisplayinformation1_tests();
}
......@@ -29,6 +29,22 @@
typedef NET_API_STATUS (WINAPI *NetpGetComputerName_func)(LPWSTR *Buffer);
WCHAR user_name[UNLEN + 1];
WCHAR computer_name[MAX_COMPUTERNAME_LENGTH + 1];
void init_wksta_tests(void)
{
DWORD dwSize;
user_name[0] = 0;
dwSize = sizeof(user_name);
ok(GetUserNameW(user_name, &dwSize), "User Name Retrieved");
computer_name[0] = 0;
dwSize = sizeof(computer_name);
ok(GetComputerNameW(computer_name, &dwSize), "Computer Name Retrieved");
}
void run_get_comp_name_tests(void)
{
HANDLE hnetapi32 = GetModuleHandleA("netapi32.dll");
......@@ -41,13 +57,13 @@ void run_get_comp_name_tests(void)
if (pNetpGetComputerName)
{
ok((*pNetpGetComputerName)(&ws) == NERR_Success, "Computer name is retrieved");
ok(ws[0] != 0, "Some value is populated to the buffer");
ok(!lstrcmpW(computer_name, ws), "This is really computer name");
NetApiBufferFree(ws);
}
}
}
void run_usergetinfo_tests(void)
void run_wkstausergetinfo_tests(void)
{
LPWKSTA_USER_INFO_0 ui0 = NULL;
LPWKSTA_USER_INFO_1 ui1 = NULL;
......@@ -57,7 +73,7 @@ void run_usergetinfo_tests(void)
/* Level 0 */
ok(NetWkstaUserGetInfo(NULL, 0, (LPBYTE *)&ui0) == NERR_Success,
"NetWkstaUserGetInfo is successful");
ok(lstrlenW(ui0->wkui0_username) >= 1, "Buffer is not empty");
ok(!lstrcmpW(user_name, ui0->wkui0_username), "This is really user name");
NetApiBufferSize(ui0, &dwSize);
ok(dwSize >= (sizeof(WKSTA_USER_INFO_0) +
lstrlenW(ui0->wkui0_username) * sizeof(WCHAR)),
......@@ -66,7 +82,6 @@ void run_usergetinfo_tests(void)
/* Level 1 */
ok(NetWkstaUserGetInfo(NULL, 1, (LPBYTE *)&ui1) == NERR_Success,
"NetWkstaUserGetInfo is successful");
ok(lstrlenW(ui1->wkui1_username) >= 1, "Buffer is not empty");
ok(lstrcmpW(ui1->wkui1_username, ui0->wkui0_username) == 0,
"the same name as returned for level 0");
NetApiBufferSize(ui1, &dwSize);
......@@ -98,5 +113,7 @@ void run_usergetinfo_tests(void)
START_TEST(wksta)
{
init_wksta_tests();
run_get_comp_name_tests();
run_wkstausergetinfo_tests();
}
......@@ -18,25 +18,54 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "winbase.h"
#include "nb30.h"
#include "lmwksta.h"
#include "lmapibuf.h"
#include "lmerr.h"
#include "winerror.h"
#include "winternl.h"
#include "ntsecapi.h"
#include <winbase.h>
#include <nb30.h>
#include <lmcons.h>
#include <lmapibuf.h>
#include <lmerr.h>
#include <lmwksta.h>
#include <winerror.h>
#include <winternl.h>
#include <ntsecapi.h>
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(netapi32);
/************************************************************
* NETAPI_IsLocalComputer
*
* Checks whether the server name indicates local machine.
*/
BOOL NETAPI_IsLocalComputer(LPCWSTR ServerName)
{
if (!ServerName)
{
return TRUE;
}
else
{
DWORD dwSize = MAX_COMPUTERNAME_LENGTH + 1;
BOOL Result;
LPWSTR buf;
NetApiBufferAllocate(dwSize * sizeof(WCHAR), (LPVOID *) &buf);
Result = GetComputerNameW(buf, &dwSize);
if (Result && (ServerName[0] == '\\') && (ServerName[1] == '\\'))
ServerName += 2;
Result = Result && !lstrcmpW(ServerName, buf);
NetApiBufferFree(buf);
return Result;
}
}
/************************************************************
* NetWkstaUserGetInfo (NETAPI32.@)
*/
NET_API_STATUS WINAPI NetWkstaUserGetInfo(LPWSTR reserved, DWORD level,
PBYTE* bufptr)
{
TRACE("(%s, %ld, %p): stub\n", debugstr_w(reserved), level, bufptr);
TRACE("(%s, %ld, %p)\n", debugstr_w(reserved), level, bufptr);
switch (level)
{
case 0:
......@@ -46,20 +75,29 @@ NET_API_STATUS WINAPI NetWkstaUserGetInfo(LPWSTR reserved, DWORD level,
/* set up buffer */
NetApiBufferAllocate(sizeof(WKSTA_USER_INFO_0) + dwSize * sizeof(WCHAR),
(LPVOID *) &bufptr);
(LPVOID *) bufptr);
ui = (WKSTA_USER_INFO_0 *) *bufptr;
ui = (PWKSTA_USER_INFO_0) *bufptr;
ui->wkui0_username = (LPWSTR) (*bufptr + sizeof(WKSTA_USER_INFO_0));
/* get data */
if (GetUserNameW(ui->wkui0_username, &dwSize))
if (!GetUserNameW(ui->wkui0_username, &dwSize))
{
NetApiBufferFree(ui);
return ERROR_NOT_ENOUGH_MEMORY;
}
else
return NERR_Success;
NetApiBufferReallocate(
*bufptr, sizeof(WKSTA_USER_INFO_0) +
(lstrlenW(ui->wkui0_username) + 1) * sizeof(WCHAR),
(LPVOID *) bufptr);
break;
}
case 1:
{
PWKSTA_USER_INFO_1 ui;
PWKSTA_USER_INFO_0 ui0;
DWORD dwSize;
LSA_OBJECT_ATTRIBUTES ObjectAttributes;
LSA_HANDLE PolicyHandle;
......@@ -70,10 +108,14 @@ NET_API_STATUS WINAPI NetWkstaUserGetInfo(LPWSTR reserved, DWORD level,
int username_sz, logon_domain_sz, oth_domains_sz, logon_server_sz;
FIXME("Level 1 processing is partially implemented\n");
username_sz = UNLEN + 1;
oth_domains_sz = 1;
logon_server_sz = 1;
/* get some information first to estimate size of the buffer */
ui0 = NULL;
NetWkstaUserGetInfo(NULL, 0, (PBYTE *) &ui0);
username_sz = lstrlenW(ui0->wkui0_username) + 1;
ZeroMemory(&ObjectAttributes, sizeof(ObjectAttributes));
NtStatus = LsaOpenPolicy(NULL, &ObjectAttributes,
POLICY_VIEW_LOCAL_INFORMATION,
......@@ -82,9 +124,9 @@ NET_API_STATUS WINAPI NetWkstaUserGetInfo(LPWSTR reserved, DWORD level,
{
ERR("LsaOpenPolicyFailed with NT status %lx\n",
LsaNtStatusToWinError(NtStatus));
NetApiBufferFree(ui0);
return ERROR_NOT_ENOUGH_MEMORY;
}
LsaQueryInformationPolicy(PolicyHandle, PolicyAccountDomainInformation,
(PVOID*) &DomainInfo);
logon_domain_sz = lstrlenW(DomainInfo->DomainName.Buffer) + 1;
......@@ -94,7 +136,7 @@ NET_API_STATUS WINAPI NetWkstaUserGetInfo(LPWSTR reserved, DWORD level,
NetApiBufferAllocate(sizeof(WKSTA_USER_INFO_1) +
(username_sz + logon_domain_sz +
oth_domains_sz + logon_server_sz) * sizeof(WCHAR),
(LPVOID *) &bufptr);
(LPVOID *) bufptr);
ui = (WKSTA_USER_INFO_1 *) *bufptr;
ui->wkui1_username = (LPWSTR) (*bufptr + sizeof(WKSTA_USER_INFO_1));
ui->wkui1_logon_domain = (LPWSTR) (
......@@ -108,14 +150,17 @@ NET_API_STATUS WINAPI NetWkstaUserGetInfo(LPWSTR reserved, DWORD level,
/* get data */
dwSize = username_sz;
if (GetUserNameW(ui->wkui1_username, &dwSize))
return ERROR_NOT_ENOUGH_MEMORY;
lstrcpyW(ui->wkui1_username, ui0->wkui0_username);
NetApiBufferFree(ui0);
lstrcpynW(ui->wkui1_logon_domain, DomainInfo->DomainName.Buffer,
logon_domain_sz);
LsaFreeMemory(DomainInfo);
/* FIXME. Not implemented. Populated with empty strings */
ui->wkui1_oth_domains[0] = 0;
ui->wkui1_logon_server[0] = 0;
return NERR_Success;
break;
}
case 1101:
{
......@@ -127,19 +172,20 @@ NET_API_STATUS WINAPI NetWkstaUserGetInfo(LPWSTR reserved, DWORD level,
/* set up buffer */
NetApiBufferAllocate(sizeof(WKSTA_USER_INFO_1101) + dwSize * sizeof(WCHAR),
(LPVOID *) &bufptr);
(LPVOID *) bufptr);
ui = (PWKSTA_USER_INFO_1101) *bufptr;
ui->wkui1101_oth_domains = (LPWSTR)(ui + 1);
/* get data */
ui->wkui1101_oth_domains[0] = 0;
return NERR_Success;
break;
}
default:
ERR("Invalid level %ld is specified\n", level);
return ERROR_INVALID_LEVEL;
}
return NERR_Success;
}
/************************************************************
......@@ -151,5 +197,16 @@ NET_API_STATUS WINAPI NetpGetComputerName(LPWSTR *Buffer)
TRACE("(%p)\n", Buffer);
NetApiBufferAllocate(dwSize * sizeof(WCHAR), (LPVOID *) Buffer);
return !GetComputerNameW(*Buffer, &dwSize);
if (GetComputerNameW(*Buffer, &dwSize))
{
NetApiBufferReallocate(
*Buffer, dwSize * sizeof(WCHAR),
(LPVOID *) Buffer);
return NERR_Success;
}
else
{
NetApiBufferFree(*Buffer);
return ERROR_NOT_ENOUGH_MEMORY;
}
}
......@@ -44,6 +44,7 @@ INSTALLED_INCLUDES = \
lm.h \
lmaccess.h \
lmapibuf.h \
lmbrowsr.h \
lmcons.h \
lmerr.h \
lmwksta.h \
......
......@@ -23,6 +23,7 @@
#include <lmcons.h>
#include <lmerr.h>
#include <lmbrowsr.h>
#include <lmaccess.h>
#include <lmwksta.h>
#include <lmapibuf.h>
......
/*
* Copyright 2002 Andriy Palamarchuk
*
* Browser NET API calls
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __WINE_LMBROWSR_H
#define __WINE_LMBROWSR_H
#ifdef __cplusplus
extern "C" {
#endif
typedef struct _BROWSER_EMULATED_DOMAIN {
LPWSTR DomainName;
LPWSTR EmulatedServerName;
DWORD Role;
} BROWSER_EMULATED_DOMAIN, *PBROWSER_EMULATED_DOMAIN;
NET_API_STATUS WINAPI I_BrowserSetNetlogonState(
LPWSTR ServerName, LPWSTR DomainName, LPWSTR EmulatedServerName,
DWORD Role);
NET_API_STATUS WINAPI I_BrowserQueryEmulatedDomains(
LPWSTR ServerName, PBROWSER_EMULATED_DOMAIN *EmulatedDomains,
LPDWORD EntriesRead);
#ifdef __cplusplus
}
#endif
#endif
......@@ -23,6 +23,8 @@
#define NET_API_STATUS DWORD
#define MAX_PREFERRED_LENGTH ((DWORD) -1)
/* Lan manager API defines */
#define UNLEN 256 /* Maximum user name length */
......
......@@ -23,8 +23,11 @@
#define NERR_Success 0
#define NERR_BASE 2100
#define NERR_BASE 2100
#define MAX_NERR (NERR_BASE+899)
#define NERR_UserNotFound (NERR_BASE + 121)
#define NERR_InvalidComputer (NERR_BASE + 251)
#define MAX_NERR (NERR_BASE + 899)
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment