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
76880ff9
Commit
76880ff9
authored
Jul 10, 2012
by
Andrew Eikum
Committed by
Alexandre Julliard
Jul 10, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpr: Don't succeed if drive is not remote in WNetGetUniversalName.
parent
110249d6
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
86 additions
and
2 deletions
+86
-2
configure
configure
+1
-0
configure.ac
configure.ac
+1
-0
Makefile.in
dlls/mpr/tests/Makefile.in
+7
-0
mpr.c
dlls/mpr/tests/mpr.c
+65
-0
wnet.c
dlls/mpr/wnet.c
+12
-2
No files found.
configure
View file @
76880ff9
...
@@ -15288,6 +15288,7 @@ wine_fn_config_dll monodebg.vxd enable_win16
...
@@ -15288,6 +15288,7 @@ wine_fn_config_dll monodebg.vxd enable_win16
wine_fn_config_dll mountmgr.sys enable_mountmgr_sys
wine_fn_config_dll mountmgr.sys enable_mountmgr_sys
wine_fn_config_dll mouse.drv16 enable_win16
wine_fn_config_dll mouse.drv16 enable_win16
wine_fn_config_dll mpr enable_mpr implib,po
wine_fn_config_dll mpr enable_mpr implib,po
wine_fn_config_test dlls/mpr/tests mpr_test
wine_fn_config_dll mprapi enable_mprapi implib
wine_fn_config_dll mprapi enable_mprapi implib
wine_fn_config_dll msacm.dll16 enable_win16
wine_fn_config_dll msacm.dll16 enable_win16
wine_fn_config_dll msacm32.drv enable_msacm32_drv
wine_fn_config_dll msacm32.drv enable_msacm32_drv
...
...
configure.ac
View file @
76880ff9
...
@@ -2704,6 +2704,7 @@ WINE_CONFIG_DLL(monodebg.vxd,enable_win16)
...
@@ -2704,6 +2704,7 @@ WINE_CONFIG_DLL(monodebg.vxd,enable_win16)
WINE_CONFIG_DLL(mountmgr.sys)
WINE_CONFIG_DLL(mountmgr.sys)
WINE_CONFIG_DLL(mouse.drv16,enable_win16)
WINE_CONFIG_DLL(mouse.drv16,enable_win16)
WINE_CONFIG_DLL(mpr,,[implib,po])
WINE_CONFIG_DLL(mpr,,[implib,po])
WINE_CONFIG_TEST(dlls/mpr/tests)
WINE_CONFIG_DLL(mprapi,,[implib])
WINE_CONFIG_DLL(mprapi,,[implib])
WINE_CONFIG_DLL(msacm.dll16,enable_win16)
WINE_CONFIG_DLL(msacm.dll16,enable_win16)
WINE_CONFIG_DLL(msacm32.drv)
WINE_CONFIG_DLL(msacm32.drv)
...
...
dlls/mpr/tests/Makefile.in
0 → 100644
View file @
76880ff9
TESTDLL
=
mpr.dll
IMPORTS
=
mpr
C_SRCS
=
\
mpr.c
@MAKE_TEST_RULES@
dlls/mpr/tests/mpr.c
0 → 100644
View file @
76880ff9
/*
* Copyright 2012 Andrew Eikum for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define COBJMACROS
#include <stdio.h>
#include "windows.h"
#include "winnetwk.h"
#include "wine/test.h"
static
void
test_WNetGetUniversalName
(
void
)
{
DWORD
ret
;
char
buffer
[
1024
];
DWORD
drive_type
,
info_size
;
char
driveA
[]
=
"A:
\\
"
;
WCHAR
driveW
[]
=
{
'A'
,
':'
,
'\\'
,
0
};
for
(;
*
driveA
<=
'Z'
;
++*
driveA
,
++*
driveW
){
drive_type
=
GetDriveTypeW
(
driveW
);
info_size
=
sizeof
(
buffer
);
ret
=
WNetGetUniversalNameA
(
driveA
,
UNIVERSAL_NAME_INFO_LEVEL
,
buffer
,
&
info_size
);
if
(
drive_type
==
DRIVE_REMOTE
)
ok
(
ret
==
WN_NO_ERROR
,
"WNetGetUniversalNameA failed: %08x
\n
"
,
ret
);
else
ok
(
ret
==
ERROR_NOT_CONNECTED
,
"WNetGetUniversalNameA gave wrong error: %08x
\n
"
,
ret
);
ok
(
info_size
==
sizeof
(
buffer
),
"Got wrong size: %u
\n
"
,
info_size
);
info_size
=
sizeof
(
buffer
);
ret
=
WNetGetUniversalNameW
(
driveW
,
UNIVERSAL_NAME_INFO_LEVEL
,
buffer
,
&
info_size
);
if
(
drive_type
==
DRIVE_REMOTE
)
ok
(
ret
==
WN_NO_ERROR
,
"WNetGetUniversalNameW failed: %08x
\n
"
,
ret
);
else
ok
(
ret
==
ERROR_NOT_CONNECTED
,
"WNetGetUniversalNameW gave wrong error: %08x
\n
"
,
ret
);
ok
(
info_size
==
sizeof
(
buffer
),
"Got wrong size: %u
\n
"
,
info_size
);
}
}
START_TEST
(
mpr
)
{
test_WNetGetUniversalName
();
}
dlls/mpr/wnet.c
View file @
76880ff9
...
@@ -1892,6 +1892,12 @@ DWORD WINAPI WNetGetUniversalNameA ( LPCSTR lpLocalPath, DWORD dwInfoLevel,
...
@@ -1892,6 +1892,12 @@ DWORD WINAPI WNetGetUniversalNameA ( LPCSTR lpLocalPath, DWORD dwInfoLevel,
{
{
LPUNIVERSAL_NAME_INFOA
info
=
lpBuffer
;
LPUNIVERSAL_NAME_INFOA
info
=
lpBuffer
;
if
(
GetDriveTypeA
(
lpLocalPath
)
!=
DRIVE_REMOTE
)
{
err
=
ERROR_NOT_CONNECTED
;
break
;
}
size
=
sizeof
(
*
info
)
+
lstrlenA
(
lpLocalPath
)
+
1
;
size
=
sizeof
(
*
info
)
+
lstrlenA
(
lpLocalPath
)
+
1
;
if
(
*
lpBufferSize
<
size
)
if
(
*
lpBufferSize
<
size
)
{
{
...
@@ -1900,7 +1906,6 @@ DWORD WINAPI WNetGetUniversalNameA ( LPCSTR lpLocalPath, DWORD dwInfoLevel,
...
@@ -1900,7 +1906,6 @@ DWORD WINAPI WNetGetUniversalNameA ( LPCSTR lpLocalPath, DWORD dwInfoLevel,
}
}
info
->
lpUniversalName
=
(
char
*
)
info
+
sizeof
(
*
info
);
info
->
lpUniversalName
=
(
char
*
)
info
+
sizeof
(
*
info
);
lstrcpyA
(
info
->
lpUniversalName
,
lpLocalPath
);
lstrcpyA
(
info
->
lpUniversalName
,
lpLocalPath
);
*
lpBufferSize
=
size
;
err
=
WN_NO_ERROR
;
err
=
WN_NO_ERROR
;
break
;
break
;
}
}
...
@@ -1934,6 +1939,12 @@ DWORD WINAPI WNetGetUniversalNameW ( LPCWSTR lpLocalPath, DWORD dwInfoLevel,
...
@@ -1934,6 +1939,12 @@ DWORD WINAPI WNetGetUniversalNameW ( LPCWSTR lpLocalPath, DWORD dwInfoLevel,
{
{
LPUNIVERSAL_NAME_INFOW
info
=
lpBuffer
;
LPUNIVERSAL_NAME_INFOW
info
=
lpBuffer
;
if
(
GetDriveTypeW
(
lpLocalPath
)
!=
DRIVE_REMOTE
)
{
err
=
ERROR_NOT_CONNECTED
;
break
;
}
size
=
sizeof
(
*
info
)
+
(
lstrlenW
(
lpLocalPath
)
+
1
)
*
sizeof
(
WCHAR
);
size
=
sizeof
(
*
info
)
+
(
lstrlenW
(
lpLocalPath
)
+
1
)
*
sizeof
(
WCHAR
);
if
(
*
lpBufferSize
<
size
)
if
(
*
lpBufferSize
<
size
)
{
{
...
@@ -1942,7 +1953,6 @@ DWORD WINAPI WNetGetUniversalNameW ( LPCWSTR lpLocalPath, DWORD dwInfoLevel,
...
@@ -1942,7 +1953,6 @@ DWORD WINAPI WNetGetUniversalNameW ( LPCWSTR lpLocalPath, DWORD dwInfoLevel,
}
}
info
->
lpUniversalName
=
(
LPWSTR
)((
char
*
)
info
+
sizeof
(
*
info
));
info
->
lpUniversalName
=
(
LPWSTR
)((
char
*
)
info
+
sizeof
(
*
info
));
lstrcpyW
(
info
->
lpUniversalName
,
lpLocalPath
);
lstrcpyW
(
info
->
lpUniversalName
,
lpLocalPath
);
*
lpBufferSize
=
size
;
err
=
WN_NO_ERROR
;
err
=
WN_NO_ERROR
;
break
;
break
;
}
}
...
...
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