shell32/tests: ILFree is not exported on all versions
Vitaliy Margolen
wine-patch at kievinfo.com
Tue Jun 28 23:39:46 CDT 2005
w2k sp3 doesn't have ILFree exported.
Vitaliy Margolen
changelog:
dlls/shell32/tests/shlfolder.c
ILFree is not available on all versions
-------------- next part --------------
Index: dlls/shell32/tests/shlfolder.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/tests/shlfolder.c,v
retrieving revision 1.19
diff -u -p -r1.19 shlfolder.c
--- dlls/shell32/tests/shlfolder.c 24 Jun 2005 11:33:35 -0000 1.19
+++ dlls/shell32/tests/shlfolder.c 29 Jun 2005 04:28:40 -0000
@@ -47,12 +47,16 @@ static BOOL (WINAPI *pSHGetSpecialFolder
static void init_function_pointers(void)
{
HMODULE hmod = GetModuleHandleA("shell32.dll");
+ HRESULT hr;
if(hmod)
{
pSHBindToParent = (void*)GetProcAddress(hmod, "SHBindToParent");
pSHGetSpecialFolderPathW = (void*)GetProcAddress(hmod, "SHGetSpecialFolderPathW");
}
+
+ hr = SHGetMalloc(&ppM);
+ ok(hr == S_OK, "SHGetMalloc failed %08lx\n", hr);
}
/* creates a file with the specified name for tests */
@@ -197,7 +209,7 @@ static void test_BindToObject(void)
hr = IShellFolder_BindToObject(psfDesktop, pidlMyComputer, NULL, &IID_IShellFolder, (LPVOID*)&psfMyComputer);
ok (SUCCEEDED(hr), "Desktop failed to bind to MyComputer object! hr = %08lx\n", hr);
IShellFolder_Release(psfDesktop);
- ILFree(pidlMyComputer);
+ IMalloc_Free(ppM, pidlMyComputer);
if (FAILED(hr)) return;
hr = IShellFolder_BindToObject(psfMyComputer, pidlEmpty, NULL, &IID_IShellFolder, (LPVOID*)&psfChild);
@@ -220,7 +232,7 @@ static void test_BindToObject(void)
hr = IShellFolder_BindToObject(psfMyComputer, pidlSystemDir, NULL, &IID_IShellFolder, (LPVOID*)&psfSystemDir);
ok (SUCCEEDED(hr), "MyComputer failed to bind to a FileSystem ShellFolder! hr = %08lx\n", hr);
IShellFolder_Release(psfMyComputer);
- ILFree(pidlSystemDir);
+ IMalloc_Free(ppM, pidlSystemDir);
if (FAILED(hr)) return;
hr = IShellFolder_BindToObject(psfSystemDir, pidlEmpty, NULL, &IID_IShellFolder, (LPVOID*)&psfChild);
@@ -388,7 +400,7 @@ static void test_CallForAttributes(void)
lResult = RegOpenKeyExW(HKEY_CLASSES_ROOT, wszMyDocumentsKey, 0, KEY_WRITE|KEY_READ, &hKey);
todo_wine { ok (lResult == ERROR_SUCCESS, "RegOpenKeyEx failed! result: %08lx\n", lResult); }
if (lResult != ERROR_SUCCESS) {
- ILFree(pidlMyDocuments);
+ IMalloc_Free(ppM, pidlMyDocuments);
IShellFolder_Release(psfDesktop);
return;
}
@@ -399,7 +411,7 @@ static void test_CallForAttributes(void)
ok (lResult == ERROR_SUCCESS, "RegQueryValueEx failed! result: %08lx\n", lResult);
if (lResult != ERROR_SUCCESS) {
RegCloseKey(hKey);
- ILFree(pidlMyDocuments);
+ IMalloc_Free(ppM, pidlMyDocuments);
IShellFolder_Release(psfDesktop);
return;
}
@@ -411,7 +423,7 @@ static void test_CallForAttributes(void)
ok (lResult == ERROR_SUCCESS, "RegQueryValueEx failed! result: %08lx\n", lResult);
if (lResult != ERROR_SUCCESS) {
RegCloseKey(hKey);
- ILFree(pidlMyDocuments);
+ IMalloc_Free(ppM, pidlMyDocuments);
IShellFolder_Release(psfDesktop);
return;
}
@@ -444,7 +456,7 @@ static void test_CallForAttributes(void)
RegSetValueExW(hKey, wszCallForAttributes, 0, REG_DWORD,
(LPBYTE)&dwOrigCallForAttributes, sizeof(DWORD));
RegCloseKey(hKey);
- ILFree(pidlMyDocuments);
+ IMalloc_Free(ppM, pidlMyDocuments);
IShellFolder_Release(psfDesktop);
}
@@ -508,7 +520,7 @@ static void test_GetAttributesOf(void)
hr = IShellFolder_BindToObject(psfDesktop, pidlMyComputer, NULL, &IID_IShellFolder, (LPVOID*)&psfMyComputer);
ok (SUCCEEDED(hr), "Desktop failed to bind to MyComputer object! hr = %08lx\n", hr);
IShellFolder_Release(psfDesktop);
- ILFree(pidlMyComputer);
+ IMalloc_Free(ppM, pidlMyComputer);
if (FAILED(hr)) return;
hr = IShellFolder_GetAttributesOf(psfMyComputer, 1, &pidlEmpty, &dwFlags);
@@ -563,7 +575,7 @@ static void test_SHGetPathFromIDList(voi
ok (!result, "SHGetPathFromIDList succeeded where it shouldn't!\n");
ok (GetLastError()==0xdeadbeef, "SHGetPathFromIDList shouldn't set last error! Last error: %08lx\n", GetLastError());
- ILFree(pidlMyComputer);
+ IMalloc_Free(ppM, pidlMyComputer);
}
static void test_EnumObjects_and_CompareIDs(void)
@@ -580,9 +592,6 @@ static void test_EnumObjects_and_Compare
strcatW(cCurrDirW, cTestDirW);
OleInitialize(NULL);
-
- hr = SHGetMalloc(&ppM);
- ok(hr == S_OK, "SHGetMalloc failed %08lx\n", hr);
hr = SHGetDesktopFolder(&IDesktopFolder);
ok(hr == S_OK, "SHGetDesktopfolder failed %08lx\n", hr);
More information about the wine-patches
mailing list