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
988db2c0
Commit
988db2c0
authored
Jun 14, 2011
by
Mariusz Pluciński
Committed by
Alexandre Julliard
Jun 14, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32/tests: Add tests for SHGet/SetKnownFolderPath utilities.
parent
da9a8a4b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
shellpath.c
dlls/shell32/tests/shellpath.c
+24
-0
No files found.
dlls/shell32/tests/shellpath.c
View file @
988db2c0
...
...
@@ -95,6 +95,7 @@ static int (WINAPI *pSHFileOperationA)(LPSHFILEOPSTRUCTA);
static
HRESULT
(
WINAPI
*
pSHGetMalloc
)(
LPMALLOC
*
);
static
UINT
(
WINAPI
*
pGetSystemWow64DirectoryA
)(
LPSTR
,
UINT
);
static
HRESULT
(
WINAPI
*
pSHGetKnownFolderPath
)(
REFKNOWNFOLDERID
,
DWORD
,
HANDLE
,
PWSTR
*
);
static
HRESULT
(
WINAPI
*
pSHSetKnownFolderPath
)(
REFKNOWNFOLDERID
,
DWORD
,
HANDLE
,
PWSTR
);
static
HRESULT
(
WINAPI
*
pSHGetFolderPathEx
)(
REFKNOWNFOLDERID
,
DWORD
,
HANDLE
,
LPWSTR
,
DWORD
);
static
DLLVERSIONINFO
shellVersion
=
{
0
};
...
...
@@ -194,6 +195,7 @@ static void loadShell32(void)
GET_PROC
(
SHGetFolderPathEx
)
GET_PROC
(
SHGetFolderLocation
)
GET_PROC
(
SHGetKnownFolderPath
)
GET_PROC
(
SHSetKnownFolderPath
)
GET_PROC
(
SHGetSpecialFolderPathA
)
GET_PROC
(
SHGetSpecialFolderLocation
)
GET_PROC
(
ILFindLastID
)
...
...
@@ -1214,6 +1216,28 @@ static void test_knownFolders(void)
ok
(
lstrcmpiW
(
folderPath
,
sExamplePath
)
==
0
,
"invalid known folder path retreived:
\"
%s
\"
when
\"
%s
\"
was expected
\n
"
,
wine_dbgstr_w
(
folderPath
),
wine_dbgstr_w
(
sExamplePath
));
CoTaskMemFree
(
folderPath
);
/* check shell utility functions */
if
(
!
pSHGetKnownFolderPath
||
!
pSHSetKnownFolderPath
)
todo_wine
win_skip
(
"cannot get SHGet/SetKnownFolderPath routines
\n
"
);
else
{
/* check shell utility functions */
/* try to get current known folder path */
hr
=
pSHGetKnownFolderPath
(
&
newFolderId
,
0
,
NULL
,
&
folderPath
);
ok
(
hr
==
S_OK
,
"cannot get known folder path: hr=0x%0x
\n
"
,
hr
);
ok
(
lstrcmpW
(
folderPath
,
sExamplePath
)
==
0
,
"invalid path returned: %s
\n
"
,
wine_dbgstr_w
(
folderPath
));
/* set it to new value */
hr
=
pSHSetKnownFolderPath
(
&
newFolderId
,
0
,
NULL
,
sExample2Path
);
ok
(
hr
==
S_OK
,
"cannot set known folder path: hr=0x%0x
\n
"
,
hr
);
/* check if it changed */
hr
=
pSHGetKnownFolderPath
(
&
newFolderId
,
0
,
NULL
,
&
folderPath
);
ok
(
hr
==
S_OK
,
"cannot get known folder path: hr=0x%0x
\n
"
,
hr
);
ok
(
lstrcmpW
(
folderPath
,
sExample2Path
)
==
0
,
"invalid path returned: %s
\n
"
,
wine_dbgstr_w
(
folderPath
));
}
hr
=
IKnownFolder_Release
(
folder
);
ok
(
hr
==
S_OK
,
"failed to release KnownFolder instance: 0x%08x
\n
"
,
hr
);
}
...
...
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