Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
6199b282
Commit
6199b282
authored
Mar 30, 2005
by
Hans Leidekker
Committed by
Alexandre Julliard
Mar 30, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Return a computername constructed from the hostname.
parent
09e00cf4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
12 deletions
+44
-12
computername.c
dlls/kernel/computername.c
+44
-12
No files found.
dlls/kernel/computername.c
View file @
6199b282
...
...
@@ -683,23 +683,55 @@ BOOL WINAPI SetComputerNameExA( COMPUTER_NAME_FORMAT type, LPCSTR lpComputerName
/***********************************************************************
* DnsHostnameToComputerNameA (KERNEL32.@)
*/
BOOL
WINAPI
DnsHostnameToComputerNameA
(
LPCSTR
Hostname
,
LPSTR
ComputerN
ame
,
LPDWORD
nS
ize
)
BOOL
WINAPI
DnsHostnameToComputerNameA
(
LPCSTR
hostn
ame
,
LPSTR
computername
,
LPDWORD
s
ize
)
{
FIXME
(
"(%s, %s, %08lx): stub
\n
"
,
debugstr_a
(
Hostname
),
debugstr_a
(
ComputerName
),
*
nSize
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
FALSE
;
DWORD
len
;
FIXME
(
"(%s, %p, %p): stub
\n
"
,
debugstr_a
(
hostname
),
computername
,
size
);
if
(
!
hostname
||
!
size
)
return
FALSE
;
len
=
lstrlenA
(
hostname
);
if
(
len
>
MAX_COMPUTERNAME_LENGTH
)
len
=
MAX_COMPUTERNAME_LENGTH
;
if
(
*
size
<
len
)
{
*
size
=
len
;
return
FALSE
;
}
if
(
!
computername
)
return
FALSE
;
memcpy
(
computername
,
hostname
,
len
);
computername
[
len
+
1
]
=
0
;
return
TRUE
;
}
/***********************************************************************
* DnsHostnameToComputerNameW (KERNEL32.@)
*/
BOOL
WINAPI
DnsHostnameToComputerNameW
(
LPCWSTR
Hostname
,
LPWSTR
ComputerN
ame
,
LPDWORD
nS
ize
)
BOOL
WINAPI
DnsHostnameToComputerNameW
(
LPCWSTR
hostn
ame
,
LPWSTR
computername
,
LPDWORD
s
ize
)
{
FIXME
(
"(%s, %s, %08lx): stub
\n
"
,
debugstr_w
(
Hostname
),
debugstr_w
(
ComputerName
),
*
nSize
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
FALSE
;
DWORD
len
;
FIXME
(
"(%s, %p, %p): stub
\n
"
,
debugstr_w
(
hostname
),
computername
,
size
);
if
(
!
hostname
||
!
size
)
return
FALSE
;
len
=
lstrlenW
(
hostname
);
if
(
len
>
MAX_COMPUTERNAME_LENGTH
)
len
=
MAX_COMPUTERNAME_LENGTH
;
if
(
*
size
<
len
)
{
*
size
=
len
;
return
FALSE
;
}
if
(
!
computername
)
return
FALSE
;
memcpy
(
computername
,
hostname
,
len
*
sizeof
(
WCHAR
)
);
computername
[
len
+
1
]
=
0
;
return
TRUE
;
}
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