Hi,
this change to shell32/tests/shlfolder.c fails on Win98/WinNT and W2KProf because ILFindLastID is not exported on those platforms.
I tried to change shlfolder.c to test for the export, but that shows that it's not exported on Wine either ? The .spec file says different.
Apart from that, 2 todo_wine's can be removed:
shlfolder.c:452: Test succeeded inside todo block: SFGAO_FILESYSTEM attribute is not set for MyDocuments! shlfolder.c:461: Test succeeded inside todo block: RegOpenKeyEx failed! result: 00000000
But I'd like to leave that to the person how fixes the first problem :-).
Cheers,
Paul.
* On Sat, 3 Sep 2005, Paul Vriens wrote:
this change to shell32/tests/shlfolder.c fails on Win98/WinNT and W2KProf because ILFindLastID is not exported on those platforms.
I tried to change shlfolder.c to test for the export, but that shows that it's not exported on Wine either ? The .spec file says different.
I have made pretty trivial change and it worksforme. See below.
shlfolder.c:452: Test succeeded inside todo block: SFGAO_FILESYSTEM attribute is not set for MyDocuments! shlfolder.c:461: Test succeeded inside todo block: RegOpenKeyEx failed! result: 00000000
But I'd like to leave that to the person how fixes the first problem :-).
I am out of that part of a game as shell32 tests fails horribly on my box. :-/
Log message: Saulius Krasuckas saulius.krasuckas@ieee.org SHELL32.dll.ILFindLastID isn't present on an older platforms.
Index: dlls/shell32/tests/shlfolder.c =================================================================== RCS file: /home/wine/wine/dlls/shell32/tests/shlfolder.c,v retrieving revision 1.34 diff -p -u -r1.34 shlfolder.c --- dlls/shell32/tests/shlfolder.c 29 Aug 2005 21:45:49 -0000 1.34 +++ dlls/shell32/tests/shlfolder.c 3 Sep 2005 16:48:35 -0000 @@ -46,6 +46,7 @@ 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 LPITEMIDLIST (WINAPI *pILFindLastID)(LPCITEMIDLIST);
static void init_function_pointers(void) { @@ -57,6 +58,7 @@ static void init_function_pointers(void) { pSHBindToParent = (void*)GetProcAddress(hmod, "SHBindToParent"); pSHGetSpecialFolderPathW = (void*)GetProcAddress(hmod, "SHGetSpecialFolderPathW"); + pILFindLastID = (void *)GetProcAddress(hmod, "ILFindLastID"); }
hmod = GetModuleHandleA("shlwapi.dll"); @@ -379,7 +381,7 @@ static void test_GetDisplayName(void)
/* This test shows that Windows doesn't allocate a new pidlLast, but returns a pointer into * pidlTestFile (In accordance with MSDN). */ - todo_wine{ok (ILFindLastID(pidlTestFile) == pidlLast, + todo_wine{ok (pILFindLastID(pidlTestFile) == pidlLast, "SHBindToParent doesn't return the last id of the pidl param!\n");}
hr = IShellFolder_GetDisplayNameOf(psfPersonal, pidlLast, SHGDN_FORPARSING, &strret);
* On Sat, 3 Sep 2005, Saulius Krasuckas wrote:
- On Sat, 3 Sep 2005, Paul Vriens wrote:
this change to shell32/tests/shlfolder.c fails on Win98/WinNT and W2KProf because ILFindLastID is not exported on those platforms.
I tried to change shlfolder.c to test for the export, but that shows that it's not exported on Wine either ? The .spec file says different.
I have made pretty trivial change and it worksforme. See below.
--- dlls/shell32/tests/shlfolder.c 29 Aug 2005 21:45:49 -0000 1.34 +++ dlls/shell32/tests/shlfolder.c 3 Sep 2005 16:48:35 -0000 @@ -46,6 +46,7 @@ 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 LPITEMIDLIST (WINAPI *pILFindLastID)(LPCITEMIDLIST);
static void init_function_pointers(void) { @@ -57,6 +58,7 @@ static void init_function_pointers(void) { pSHBindToParent = (void*)GetProcAddress(hmod, "SHBindToParent"); pSHGetSpecialFolderPathW = (void*)GetProcAddress(hmod, "SHGetSpecialFolderPathW");
pILFindLastID = (void *)GetProcAddress(hmod, "ILFindLastID");
Hehehe, now I see it dies by cathing exeption when ir tries to read 0x00000000, though "make test" doesn't say this is an error.
Alexandre, is this intentional behaviour of an in-tree testing framework? (to treat crashes during "make test" as a success)
Paul, it seems you were right -- Wine doesn't export this by name. I guess we need to copy in a more robust run-time linking code from the dlls/shell32/shellpath.c file and to access function by its number (16):
$ grep -C1 ILFindLast dlls/shell32/shell32.spec | 15 stdcall -noname ILGetDisplayName(ptr ptr) | 16 stdcall -noname ILFindLastID(ptr) | 17 stdcall -noname ILRemoveLastID(ptr)
I going to buy some food now. If no one is going to send a patch during next 40 minutes, I will be ready to do this. :-)
Saulius Krasuckas saulius2@ar.fi.lt writes:
Hehehe, now I see it dies by cathing exeption when ir tries to read 0x00000000, though "make test" doesn't say this is an error.
Alexandre, is this intentional behaviour of an in-tree testing framework? (to treat crashes during "make test" as a success)
Not really, but it's pretty hard to fix since the debugger cannot set the Unix exit status of the parent process.
Saulius Krasuckas wrote: [snip]
@@ -379,7 +381,7 @@ static void test_GetDisplayName(void)
/* This test shows that Windows doesn't allocate a new pidlLast, but returns a pointer into * pidlTestFile (In accordance with MSDN). */
- todo_wine{ok (ILFindLastID(pidlTestFile) == pidlLast,
- todo_wine{ok (pILFindLastID(pidlTestFile) == pidlLast, "SHBindToParent doesn't return the last id of the pidl param!\n");}
It would be wise to check if pILFindLastID != NULL.
* On Sat, 3 Sep 2005, Filip Navara wrote:
- Saulius Krasuckas wrote:
/* This test shows that Windows doesn't allocate a new pidlLast, but returns a pointer into * pidlTestFile (In accordance with MSDN). */
- todo_wine{ok (ILFindLastID(pidlTestFile) == pidlLast,
- todo_wine{ok (pILFindLastID(pidlTestFile) == pidlLast, "SHBindToParent doesn't return the last id of the pidl param!\n");}
It would be wise to check if pILFindLastID != NULL.
Yeah, it would be, but then I need to think about where the check should reside: there or in the init-block? If in the latter, then after this code gets executed:
pILFindLastID = (void *)GetProcAddress(hShell32, (LPCSTR)16);
... I doubt we still were receiving NULL.
* On Sat, 3 Sep 2005, Saulius Krasuckas wrote:
- On Sat, 3 Sep 2005, Filip Navara wrote:
- Saulius Krasuckas wrote:
/* This test shows that Windows doesn't allocate a new pidlLast, but returns a pointer into * pidlTestFile (In accordance with MSDN). */
- todo_wine{ok (ILFindLastID(pidlTestFile) == pidlLast,
- todo_wine{ok (pILFindLastID(pidlTestFile) == pidlLast, "SHBindToParent doesn't return the last id of the pidl param!\n");}
It would be wise to check if pILFindLastID != NULL.
Yeah, it would be, but then I need to think about where the check should reside: there or in the init-block? If in the latter, then after this code gets executed:
pILFindLastID = (void *)GetProcAddress(hShell32, (LPCSTR)16);
... I doubt we still were receiving NULL.
Nevermind, Flilip. Ice-cream cooled out my mind. Check you mention will be placed just before trying to link the function by its ordinal.