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
7f65f6a4
Commit
7f65f6a4
authored
Aug 16, 2005
by
Francois Gouget
Committed by
Alexandre Julliard
Aug 16, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dynamically load StrRetToBufW(). This lets shell32_test.exe run on
systems that have version 4.72 of shlwapi.dll.
parent
1fddb3ff
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
9 deletions
+23
-9
shlfolder.c
dlls/shell32/tests/shlfolder.c
+23
-9
No files found.
dlls/shell32/tests/shlfolder.c
View file @
7f65f6a4
...
...
@@ -43,18 +43,26 @@ static IMalloc *ppM;
static
HRESULT
(
WINAPI
*
pSHBindToParent
)(
LPCITEMIDLIST
,
REFIID
,
LPVOID
*
,
LPCITEMIDLIST
*
);
static
BOOL
(
WINAPI
*
pSHGetSpecialFolderPathW
)(
HWND
,
LPWSTR
,
int
,
BOOL
);
static
HRESULT
(
WINAPI
*
pStrRetToBufW
)(
STRRET
*
,
LPCITEMIDLIST
,
LPWSTR
,
UINT
);
static
void
init_function_pointers
(
void
)
{
HMODULE
hmod
=
GetModuleHandleA
(
"shell32.dll"
)
;
HMODULE
hmod
;
HRESULT
hr
;
hmod
=
GetModuleHandleA
(
"shell32.dll"
);
if
(
hmod
)
{
pSHBindToParent
=
(
void
*
)
GetProcAddress
(
hmod
,
"SHBindToParent"
);
pSHGetSpecialFolderPathW
=
(
void
*
)
GetProcAddress
(
hmod
,
"SHGetSpecialFolderPathW"
);
}
hmod
=
GetModuleHandleA
(
"shlwapi.dll"
);
if
(
hmod
)
{
pStrRetToBufW
=
(
void
*
)
GetProcAddress
(
hmod
,
"StrRetToBufW"
);
}
hr
=
SHGetMalloc
(
&
ppM
);
ok
(
hr
==
S_OK
,
"SHGetMalloc failed %08lx
\n
"
,
hr
);
}
...
...
@@ -369,10 +377,13 @@ static void test_GetDisplayName(void)
IShellFolder_Release
(
psfPersonal
);
return
;
}
hr
=
StrRetToBufW
(
&
strret
,
pidlLast
,
wszTestFile2
,
MAX_PATH
);
ok
(
SUCCEEDED
(
hr
),
"StrRetToBufW failed! hr = %08lx
\n
"
,
hr
);
ok
(
!
lstrcmpiW
(
wszTestFile
,
wszTestFile2
),
"GetDisplayNameOf returns incorrect path!
\n
"
);
if
(
pStrRetToBufW
)
{
hr
=
pStrRetToBufW
(
&
strret
,
pidlLast
,
wszTestFile2
,
MAX_PATH
);
ok
(
SUCCEEDED
(
hr
),
"StrRetToBufW failed! hr = %08lx
\n
"
,
hr
);
ok
(
!
lstrcmpiW
(
wszTestFile
,
wszTestFile2
),
"GetDisplayNameOf returns incorrect path!
\n
"
);
}
IShellFolder_Release
(
psfDesktop
);
IShellFolder_Release
(
psfPersonal
);
...
...
@@ -661,10 +672,13 @@ static void test_SHGetPathFromIDList(void)
IMalloc_Free
(
ppM
,
pidlTestFile
);
return
;
}
StrRetToBufW
(
&
strret
,
pidlTestFile
,
wszPath
,
MAX_PATH
);
ok
(
0
==
lstrcmpW
(
wszFileName
,
wszPath
),
"Desktop->GetDisplayNameOf(pidlTestFile, SHGDN_FORPARSING) "
"returned incorrect path for file placed on desktop
\n
"
);
if
(
pStrRetToBufW
)
{
pStrRetToBufW
(
&
strret
,
pidlTestFile
,
wszPath
,
MAX_PATH
);
ok
(
0
==
lstrcmpW
(
wszFileName
,
wszPath
),
"Desktop->GetDisplayNameOf(pidlTestFile, SHGDN_FORPARSING) "
"returned incorrect path for file placed on desktop
\n
"
);
}
result
=
SHGetPathFromIDListW
(
pidlTestFile
,
wszPath
);
ok
(
result
,
"SHGetPathFromIDListW failed! Last error: %08lx
\n
"
,
GetLastError
());
...
...
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