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
6782d2b4
Commit
6782d2b4
authored
Mar 07, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
netapi32: Added support for more info levels in NetWkstaGetInfo.
parent
8caf0787
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
12 deletions
+18
-12
wksta.c
dlls/netapi32/wksta.c
+18
-12
No files found.
dlls/netapi32/wksta.c
View file @
6782d2b4
...
...
@@ -489,7 +489,10 @@ NET_API_STATUS WINAPI NetWkstaGetInfo( LPWSTR servername, DWORD level,
switch
(
level
)
{
case
100
:
case
101
:
case
102
:
{
static
const
WCHAR
lanroot
[]
=
{
'c'
,
':'
,
'\\'
,
'l'
,
'a'
,
'n'
,
'm'
,
'a'
,
'n'
,
0
};
/* FIXME */
DWORD
computerNameLen
,
domainNameLen
,
size
;
WCHAR
computerName
[
MAX_COMPUTERNAME_LENGTH
+
1
];
LSA_OBJECT_ATTRIBUTES
ObjectAttributes
;
...
...
@@ -512,28 +515,31 @@ NET_API_STATUS WINAPI NetWkstaGetInfo( LPWSTR servername, DWORD level,
LsaQueryInformationPolicy
(
PolicyHandle
,
PolicyAccountDomainInformation
,
(
PVOID
*
)
&
DomainInfo
);
domainNameLen
=
lstrlenW
(
DomainInfo
->
DomainName
.
Buffer
)
+
1
;
size
=
sizeof
(
WKSTA_INFO_10
0
)
+
computerNameLen
*
sizeof
(
WCHAR
)
+
domainNameLen
*
sizeof
(
WCHAR
);
size
=
sizeof
(
WKSTA_INFO_10
2
)
+
computerNameLen
*
sizeof
(
WCHAR
)
+
domainNameLen
*
sizeof
(
WCHAR
)
+
sizeof
(
lanroot
);
ret
=
NetApiBufferAllocate
(
size
,
(
LPVOID
*
)
bufptr
);
if
(
ret
==
NERR_Success
)
{
PWKSTA_INFO_100
info
=
(
PWKSTA_INFO_100
)
*
bufptr
;
/* INFO_100 and INFO_101 structures are subsets of INFO_102 */
PWKSTA_INFO_102
info
=
(
PWKSTA_INFO_102
)
*
bufptr
;
OSVERSIONINFOW
verInfo
;
info
->
wki10
0
_platform_id
=
PLATFORM_ID_NT
;
info
->
wki10
0
_computername
=
(
LPWSTR
)(
*
bufptr
+
sizeof
(
WKSTA_INFO_10
0
));
memcpy
(
info
->
wki10
0
_computername
,
computerName
,
info
->
wki10
2
_platform_id
=
PLATFORM_ID_NT
;
info
->
wki10
2
_computername
=
(
LPWSTR
)(
*
bufptr
+
sizeof
(
WKSTA_INFO_10
2
));
memcpy
(
info
->
wki10
2
_computername
,
computerName
,
computerNameLen
*
sizeof
(
WCHAR
));
info
->
wki100_langroup
=
(
LPWSTR
)(
*
bufptr
+
sizeof
(
WKSTA_INFO_100
)
+
computerNameLen
*
sizeof
(
WCHAR
));
memcpy
(
info
->
wki100_langroup
,
DomainInfo
->
DomainName
.
Buffer
,
info
->
wki102_langroup
=
info
->
wki102_computername
+
computerNameLen
;
memcpy
(
info
->
wki102_langroup
,
DomainInfo
->
DomainName
.
Buffer
,
domainNameLen
*
sizeof
(
WCHAR
));
info
->
wki102_lanroot
=
info
->
wki102_langroup
+
domainNameLen
;
memcpy
(
info
->
wki102_lanroot
,
lanroot
,
sizeof
(
lanroot
));
memset
(
&
verInfo
,
0
,
sizeof
(
verInfo
));
verInfo
.
dwOSVersionInfoSize
=
sizeof
(
verInfo
);
GetVersionExW
(
&
verInfo
);
info
->
wki100_ver_major
=
verInfo
.
dwMajorVersion
;
info
->
wki100_ver_minor
=
verInfo
.
dwMinorVersion
;
info
->
wki102_ver_major
=
verInfo
.
dwMajorVersion
;
info
->
wki102_ver_minor
=
verInfo
.
dwMinorVersion
;
info
->
wki102_logged_on_users
=
1
;
}
LsaFreeMemory
(
DomainInfo
);
LsaClose
(
PolicyHandle
);
...
...
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