Make the shlfolder.c test compile and run on Windows
Francois Gouget
fgouget at codeweavers.com
Thu Jul 21 11:23:22 CDT 2005
Changelog:
* dlls/shell32/tests/shlfolder.c
Francois Gouget <fgouget at codeweavers.com>
The XP-SP2 PSDK does not have SFGAO_STORAGE_ANCESTOR so define it
ourselves.
Old shell32 versions are missing StrRetToBufW() so load it dynamically.
--
Francois Gouget
fgouget at codeweavers.com
-------------- next part --------------
Index: dlls/shell32/tests/shlfolder.c
===================================================================
RCS file: /var/cvs/wine/dlls/shell32/tests/shlfolder.c,v
retrieving revision 1.24
diff -u -p -r1.24 shlfolder.c
--- dlls/shell32/tests/shlfolder.c 11 Jul 2005 10:59:41 -0000 1.24
+++ dlls/shell32/tests/shlfolder.c 13 Jul 2005 18:50:25 -0000
@@ -38,11 +38,15 @@
#include "wine/unicode.h"
#include "wine/test.h"
+#ifndef SFGAO_STORAGE_ANCESTOR
+#define SFGAO_STORAGE_ANCESTOR 0x00800000L
+#endif
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)
{
@@ -53,6 +57,7 @@ static void init_function_pointers(void)
{
pSHBindToParent = (void*)GetProcAddress(hmod, "SHBindToParent");
pSHGetSpecialFolderPathW = (void*)GetProcAddress(hmod, "SHGetSpecialFolderPathW");
+ pStrRetToBufW = (void*)GetProcAddress(hmod, "StrRetToBufW");
}
hr = SHGetMalloc(&ppM);
@@ -338,7 +343,7 @@ static void test_GetDisplayName(void)
return;
}
- hr = StrRetToBufW(&strret, pidlLast, wszTestFile2, MAX_PATH);
+ 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");
More information about the wine-patches
mailing list