Module: wine Branch: master Commit: 14712ece185a6c35f8706f9fc4956a509b7caad2 URL: http://source.winehq.org/git/wine.git/?a=commit;h=14712ece185a6c35f8706f9fc4...
Author: Francois Gouget fgouget@free.fr Date: Fri Feb 9 12:38:11 2007 +0100
shell32/tests: ILFree() and ILIsEqual() are exported by ordinal only on Win9x. So use GetProcAddress().
---
dlls/shell32/tests/shlfolder.c | 33 ++++++++++++++++++--------------- 1 files changed, 18 insertions(+), 15 deletions(-)
diff --git a/dlls/shell32/tests/shlfolder.c b/dlls/shell32/tests/shlfolder.c index 4606fff..714652f 100644 --- a/dlls/shell32/tests/shlfolder.c +++ b/dlls/shell32/tests/shlfolder.c @@ -46,6 +46,8 @@ static HRESULT (WINAPI *pSHBindToParent) static BOOL (WINAPI *pSHGetSpecialFolderPathW)(HWND, LPWSTR, int, BOOL); static HRESULT (WINAPI *pStrRetToBufW)(STRRET*,LPCITEMIDLIST,LPWSTR,UINT); static LPITEMIDLIST (WINAPI *pILFindLastID)(LPCITEMIDLIST); +static void (WINAPI *pILFree)(LPITEMIDLIST); +static BOOL (WINAPI *pILIsEqual)(LPCITEMIDLIST, LPCITEMIDLIST);
static void init_function_pointers(void) { @@ -58,7 +60,8 @@ static void init_function_pointers(void) pSHBindToParent = (void*)GetProcAddress(hmod, "SHBindToParent"); pSHGetSpecialFolderPathW = (void*)GetProcAddress(hmod, "SHGetSpecialFolderPathW"); pILFindLastID = (void *)GetProcAddress(hmod, (LPCSTR)16); - + pILFree = (void*)GetProcAddress(hmod, (LPSTR)155); + pILIsEqual = (void*)GetProcAddress(hmod, (LPSTR)21); }
hmod = GetModuleHandleA("shlwapi.dll"); @@ -429,10 +432,10 @@ static void test_GetDisplayName(void) hr = IShellFolder_SetNameOf(psfPersonal, NULL, pidlNew, wszFileName, SHGDN_FORPARSING, NULL); ok (SUCCEEDED(hr), "SetNameOf failed! hr = %08x\n", hr);
- ILFree(pidlNew); + pILFree(pidlNew); IShellFolder_Release(psfPersonal); } - + /* Deleting the file and the directory */ DeleteFileA(szTestFile); RemoveDirectoryA(szTestDir); @@ -1122,17 +1125,17 @@ static void test_FolderShortcut(void) { ok (SUCCEEDED(hr), "IPersistFolder3::Initialize failed! hr = %08x\n", hr); if (FAILED(hr)) { IPersistFolder3_Release(pPersistFolder3); - ILFree(pidlWineTestFolder); + pILFree(pidlWineTestFolder); return; } - + hr = IPersistFolder3_GetCurFolder(pPersistFolder3, &pidlCurrentFolder); ok(SUCCEEDED(hr), "IPersistFolder3_GetCurFolder failed! hr=0x%08x\n", hr); - ok(ILIsEqual(pidlCurrentFolder, pidlWineTestFolder), + ok(pILIsEqual(pidlCurrentFolder, pidlWineTestFolder), "IPersistFolder3_GetCurFolder should return pidlWineTestFolder!\n"); - ILFree(pidlCurrentFolder); - ILFree(pidlWineTestFolder); - + pILFree(pidlCurrentFolder); + pILFree(pidlWineTestFolder); + hr = IPersistFolder3_QueryInterface(pPersistFolder3, &IID_IShellFolder, (LPVOID*)&pShellFolder); IPersistFolder3_Release(pPersistFolder3); ok(SUCCEEDED(hr), "IPersistFolder3_QueryInterface(IShellFolder) failed! hr = %08x\n", hr); @@ -1166,12 +1169,12 @@ static void test_FolderShortcut(void) { return; }
- hr = IShellFolder_BindToObject(pShellFolder, pidlSubFolder, NULL, &IID_IPersistFolder3, + hr = IShellFolder_BindToObject(pShellFolder, pidlSubFolder, NULL, &IID_IPersistFolder3, (LPVOID*)&pPersistFolder3); IShellFolder_Release(pShellFolder); - ILFree(pidlSubFolder); + pILFree(pidlSubFolder); ok (SUCCEEDED(hr), "IShellFolder::BindToObject failed! hr = %08x\n", hr); - if (FAILED(hr)) + if (FAILED(hr)) return;
/* On windows, we expect CLSID_ShellFSFolder. On wine we relax this constraint @@ -1242,10 +1245,10 @@ static void test_ITEMIDLIST_format(void) return; }
- hr = IShellFolder_BindToObject(psfDesktop, pidlPersonal, NULL, &IID_IShellFolder, + hr = IShellFolder_BindToObject(psfDesktop, pidlPersonal, NULL, &IID_IShellFolder, (LPVOID*)&psfPersonal); IShellFolder_Release(psfDesktop); - ILFree(pidlPersonal); + pILFree(pidlPersonal); ok(SUCCEEDED(hr), "psfDesktop->BindToObject failed! hr = %08x\n", hr); if (FAILED(hr)) return;
@@ -1329,7 +1332,7 @@ static void test_ITEMIDLIST_format(void) } }
- ILFree(pidlFile); + pILFree(pidlFile); } }