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
b37eab4e
Commit
b37eab4e
authored
May 07, 2004
by
Krishna Murthy
Committed by
Alexandre Julliard
May 07, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WNetGetConnection(): use QueryDosDevice to return a fake remote name
instead of the drive label.
parent
57f7a2c1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
wnet.c
dlls/mpr/wnet.c
+9
-8
No files found.
dlls/mpr/wnet.c
View file @
b37eab4e
...
...
@@ -1547,6 +1547,8 @@ DWORD WINAPI WNetGetConnectionA( LPCSTR lpLocalName,
WCHAR
wideRemoteStatic
[
MAX_PATH
];
DWORD
wideRemoteSize
=
sizeof
(
wideRemoteStatic
)
/
sizeof
(
WCHAR
);
MultiByteToWideChar
(
CP_ACP
,
0
,
lpLocalName
,
-
1
,
wideLocalName
,
len
);
/* try once without memory allocation */
ret
=
WNetGetConnectionW
(
wideLocalName
,
wideRemoteStatic
,
&
wideRemoteSize
);
...
...
@@ -1632,28 +1634,27 @@ DWORD WINAPI WNetGetConnectionW( LPCWSTR lpLocalName,
ret
=
WN_BAD_LOCALNAME
;
else
{
WCHAR
label
[
40
];
if
(
lpLocalName
[
1
]
==
':'
)
{
switch
(
GetDriveTypeW
(
lpLocalName
))
{
case
DRIVE_REMOTE
:
if
(
!
GetVolumeInformationW
(
lpLocalName
,
label
,
sizeof
(
label
),
NULL
,
NULL
,
NULL
,
NULL
,
0
))
label
[
0
]
=
0
;
if
(
strlenW
(
label
)
+
1
>
*
lpBufferSize
)
{
WCHAR
remote
[
MAX_PATH
];
if
(
!
QueryDosDeviceW
(
lpLocalName
,
remote
,
MAX_PATH
))
remote
[
0
]
=
0
;
if
(
strlenW
(
remote
)
+
1
>
*
lpBufferSize
)
{
*
lpBufferSize
=
strlenW
(
label
)
+
1
;
*
lpBufferSize
=
strlenW
(
remote
)
+
1
;
ret
=
WN_MORE_DATA
;
}
else
{
strcpyW
(
lpRemoteName
,
label
);
strcpyW
(
lpRemoteName
,
remote
);
*
lpBufferSize
=
strlenW
(
lpRemoteName
)
+
1
;
ret
=
WN_SUCCESS
;
}
break
;
}
case
DRIVE_REMOVABLE
:
case
DRIVE_FIXED
:
case
DRIVE_CDROM
:
...
...
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