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
dc577ed6
Commit
dc577ed6
authored
Jan 20, 2007
by
Detlef Riekenberg
Committed by
Alexandre Julliard
Jan 22, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: GetVolumeNameForMountPoint not present before w2k.
parent
9b8f699a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
8 deletions
+30
-8
volume.c
dlls/kernel32/tests/volume.c
+30
-8
No files found.
dlls/kernel32/tests/volume.c
View file @
dc577ed6
...
...
@@ -27,6 +27,12 @@
#define LANMAN "LANMANREDIRECTOR"
#define RAMDISK "RAMDISK"
static
HINSTANCE
hdll
;
static
BOOL
(
WINAPI
*
pGetVolumeNameForVolumeMountPointA
)(
LPCSTR
,
LPSTR
,
DWORD
);
static
BOOL
(
WINAPI
*
pGetVolumeNameForVolumeMountPointW
)(
LPCWSTR
,
LPWSTR
,
DWORD
);
/* ############################### */
static
void
test_query_dos_deviceA
(
void
)
{
char
drivestr
[]
=
"a:"
;
...
...
@@ -51,18 +57,24 @@ static void test_GetVolumeNameForVolumeMountPointA(void)
char
volume
[
MAX_PATH
],
path
[]
=
"c:
\\
"
;
DWORD
len
=
sizeof
(
volume
);
ret
=
GetVolumeNameForVolumeMountPointA
(
path
,
volume
,
0
);
/* not present before w2k */
if
(
!
pGetVolumeNameForVolumeMountPointA
)
{
skip
(
"GetVolumeNameForVolumeMountPointA not found
\n
"
);
return
;
}
ret
=
pGetVolumeNameForVolumeMountPointA
(
path
,
volume
,
0
);
ok
(
ret
==
FALSE
,
"GetVolumeNameForVolumeMountPointA succeeded
\n
"
);
if
(
0
)
{
/* these crash on XP */
ret
=
GetVolumeNameForVolumeMountPointA
(
path
,
NULL
,
len
);
ret
=
p
GetVolumeNameForVolumeMountPointA
(
path
,
NULL
,
len
);
ok
(
ret
==
FALSE
,
"GetVolumeNameForVolumeMountPointA succeeded
\n
"
);
ret
=
GetVolumeNameForVolumeMountPointA
(
NULL
,
volume
,
len
);
ret
=
p
GetVolumeNameForVolumeMountPointA
(
NULL
,
volume
,
len
);
ok
(
ret
==
FALSE
,
"GetVolumeNameForVolumeMountPointA succeeded
\n
"
);
}
ret
=
GetVolumeNameForVolumeMountPointA
(
path
,
volume
,
len
);
ret
=
p
GetVolumeNameForVolumeMountPointA
(
path
,
volume
,
len
);
ok
(
ret
==
TRUE
,
"GetVolumeNameForVolumeMountPointA failed
\n
"
);
}
...
...
@@ -72,23 +84,33 @@ static void test_GetVolumeNameForVolumeMountPointW(void)
WCHAR
volume
[
MAX_PATH
],
path
[]
=
{
'c'
,
':'
,
'\\'
,
0
};
DWORD
len
=
sizeof
(
volume
)
/
sizeof
(
WCHAR
);
ret
=
GetVolumeNameForVolumeMountPointW
(
path
,
volume
,
0
);
/* not present before w2k */
if
(
!
pGetVolumeNameForVolumeMountPointW
)
{
skip
(
"GetVolumeNameForVolumeMountPointW not found
\n
"
);
return
;
}
ret
=
pGetVolumeNameForVolumeMountPointW
(
path
,
volume
,
0
);
ok
(
ret
==
FALSE
,
"GetVolumeNameForVolumeMountPointA succeeded
\n
"
);
if
(
0
)
{
/* these crash on XP */
ret
=
GetVolumeNameForVolumeMountPointW
(
path
,
NULL
,
len
);
ret
=
p
GetVolumeNameForVolumeMountPointW
(
path
,
NULL
,
len
);
ok
(
ret
==
FALSE
,
"GetVolumeNameForVolumeMountPointW succeeded
\n
"
);
ret
=
GetVolumeNameForVolumeMountPointW
(
NULL
,
volume
,
len
);
ret
=
p
GetVolumeNameForVolumeMountPointW
(
NULL
,
volume
,
len
);
ok
(
ret
==
FALSE
,
"GetVolumeNameForVolumeMountPointW succeeded
\n
"
);
}
ret
=
GetVolumeNameForVolumeMountPointW
(
path
,
volume
,
len
);
ret
=
p
GetVolumeNameForVolumeMountPointW
(
path
,
volume
,
len
);
ok
(
ret
==
TRUE
,
"GetVolumeNameForVolumeMountPointW failed
\n
"
);
}
START_TEST
(
volume
)
{
hdll
=
GetModuleHandleA
(
"kernel32.dll"
);
pGetVolumeNameForVolumeMountPointA
=
(
void
*
)
GetProcAddress
(
hdll
,
"GetVolumeNameForVolumeMountPointA"
);
pGetVolumeNameForVolumeMountPointW
=
(
void
*
)
GetProcAddress
(
hdll
,
"GetVolumeNameForVolumeMountPointW"
);
test_query_dos_deviceA
();
test_GetVolumeNameForVolumeMountPointA
();
test_GetVolumeNameForVolumeMountPointW
();
...
...
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