Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
56ff1cc7
Commit
56ff1cc7
authored
Feb 16, 2015
by
Hans Leidekker
Committed by
Alexandre Julliard
Feb 16, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
netapi32: Add a partial implementation of NetUserEnum.
parent
5505413a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
55 additions
and
2 deletions
+55
-2
netapi32.c
dlls/netapi32/netapi32.c
+55
-2
No files found.
dlls/netapi32/netapi32.c
View file @
56ff1cc7
...
...
@@ -2290,10 +2290,63 @@ NetUserEnum(LPCWSTR servername, DWORD level, DWORD filter, LPBYTE* bufptr,
DWORD
prefmaxlen
,
LPDWORD
entriesread
,
LPDWORD
totalentries
,
LPDWORD
resume_handle
)
{
FIXME
(
"(%s,%d, 0x%d,%p,%d,%p,%p,%p) stub!
\n
"
,
debugstr_w
(
servername
),
level
,
NET_API_STATUS
status
;
USER_INFO_0
*
info
;
WCHAR
*
user
;
DWORD
size
;
TRACE
(
"(%s, %u, 0x%x, %p, %u, %p, %p, %p)
\n
"
,
debugstr_w
(
servername
),
level
,
filter
,
bufptr
,
prefmaxlen
,
entriesread
,
totalentries
,
resume_handle
);
return
ERROR_ACCESS_DENIED
;
status
=
NETAPI_ValidateServername
(
servername
);
if
(
status
!=
NERR_Success
)
return
status
;
if
(
!
NETAPI_IsLocalComputer
(
servername
))
{
FIXME
(
"Only implemented for local computer, but remote server"
"%s was requested.
\n
"
,
debugstr_w
(
servername
));
return
NERR_InvalidComputer
;
}
if
(
level
)
{
FIXME
(
"level %u not supported
\n
"
,
level
);
return
ERROR_INVALID_LEVEL
;
}
size
=
UNLEN
+
1
;
status
=
NetApiBufferAllocate
(
size
*
sizeof
(
WCHAR
),
(
void
**
)
&
user
);
if
(
status
!=
NERR_Success
)
return
status
;
if
(
!
GetUserNameW
(
user
,
&
size
))
{
NetApiBufferFree
(
user
);
return
ERROR_NOT_ENOUGH_MEMORY
;
}
size
=
sizeof
(
*
info
)
+
(
strlenW
(
user
)
+
1
)
*
sizeof
(
WCHAR
);
if
(
prefmaxlen
<
size
)
status
=
ERROR_MORE_DATA
;
else
status
=
NetApiBufferAllocate
(
size
,
(
void
**
)
&
info
);
if
(
status
!=
NERR_Success
)
{
NetApiBufferFree
(
user
);
return
status
;
}
info
->
usri0_name
=
(
WCHAR
*
)((
char
*
)
info
+
sizeof
(
*
info
));
strcpyW
(
info
->
usri0_name
,
user
);
*
bufptr
=
(
BYTE
*
)
info
;
*
entriesread
=
*
totalentries
=
1
;
NetApiBufferFree
(
user
);
return
NERR_Success
;
}
/************************************************************
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment