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
c3bfe66a
Commit
c3bfe66a
authored
May 22, 2007
by
Maarten Lankhorst
Committed by
Alexandre Julliard
May 23, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpr: Small fixes to WNetGetConnection.
Convert unc\server\share to \\server\share and be more tolerant to null pointers if only length is requested.
parent
41b09917
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
5 deletions
+15
-5
wnet.c
dlls/mpr/wnet.c
+15
-5
No files found.
dlls/mpr/wnet.c
View file @
c3bfe66a
...
...
@@ -3,6 +3,7 @@
*
* Copyright 1999 Ulrich Weigand
* Copyright 2004 Juan Lang
* Copyright 2007 Maarten Lankhorst
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -1526,10 +1527,10 @@ DWORD WINAPI WNetGetConnectionA( LPCSTR lpLocalName,
if
(
!
lpLocalName
)
ret
=
WN_BAD_POINTER
;
else
if
(
!
lpRemoteName
)
ret
=
WN_BAD_POINTER
;
else
if
(
!
lpBufferSize
)
ret
=
WN_BAD_POINTER
;
else
if
(
!
lpRemoteName
&&
*
lpBufferSize
)
ret
=
WN_BAD_POINTER
;
else
{
int
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
lpLocalName
,
-
1
,
NULL
,
0
);
...
...
@@ -1622,10 +1623,10 @@ DWORD WINAPI WNetGetConnectionW( LPCWSTR lpLocalName,
if
(
!
lpLocalName
)
ret
=
WN_BAD_POINTER
;
else
if
(
!
lpRemoteName
)
ret
=
WN_BAD_POINTER
;
else
if
(
!
lpBufferSize
)
ret
=
WN_BAD_POINTER
;
else
if
(
!
lpRemoteName
&&
*
lpBufferSize
)
ret
=
WN_BAD_POINTER
;
else
if
(
!
lpLocalName
[
0
])
ret
=
WN_BAD_LOCALNAME
;
else
...
...
@@ -1636,8 +1637,17 @@ DWORD WINAPI WNetGetConnectionW( LPCWSTR lpLocalName,
{
case
DRIVE_REMOTE
:
{
WCHAR
remote
[
MAX_PATH
];
static
const
WCHAR
unc
[]
=
{
'u'
,
'n'
,
'c'
,
'\\'
};
WCHAR
rremote
[
MAX_PATH
],
*
remote
=
rremote
;
if
(
!
QueryDosDeviceW
(
lpLocalName
,
remote
,
MAX_PATH
))
remote
[
0
]
=
0
;
else
if
(
!
strncmpW
(
remote
,
unc
,
4
))
{
remote
+=
2
;
remote
[
0
]
=
'\\'
;
}
else
if
(
remote
[
0
]
!=
'\\'
||
remote
[
1
]
!=
'\\'
)
FIXME
(
"Don't know how to convert %s to an unc
\n
"
,
debugstr_w
(
remote
));
if
(
strlenW
(
remote
)
+
1
>
*
lpBufferSize
)
{
*
lpBufferSize
=
strlenW
(
remote
)
+
1
;
...
...
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