Paul Vriens : shell32/tests: Run tests again on NT4.
Alexandre Julliard
julliard at winehq.org
Wed Nov 11 08:33:25 CST 2009
Module: wine
Branch: master
Commit: 8d5e5e74a1531ca13af0e64269e496ee6dbaad09
URL: http://source.winehq.org/git/wine.git/?a=commit;h=8d5e5e74a1531ca13af0e64269e496ee6dbaad09
Author: Paul Vriens <Paul.Vriens.Wine at gmail.com>
Date: Wed Nov 11 09:09:29 2009 +0100
shell32/tests: Run tests again on NT4.
---
dlls/shell32/tests/progman_dde.c | 23 +++++++++++++++++++++--
1 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/dlls/shell32/tests/progman_dde.c b/dlls/shell32/tests/progman_dde.c
index 36ce835..e4867e1 100644
--- a/dlls/shell32/tests/progman_dde.c
+++ b/dlls/shell32/tests/progman_dde.c
@@ -59,6 +59,16 @@
#define DDE_TEST_NUMMASK 0x0000ffff
+static BOOL (WINAPI *pSHGetSpecialFolderPathA)(HWND, LPSTR, int, BOOL);
+
+static void init_function_pointers(void)
+{
+ HMODULE hmod;
+
+ hmod = GetModuleHandleA("shell32.dll");
+ pSHGetSpecialFolderPathA = (void*)GetProcAddress(hmod, "SHGetSpecialFolderPathA");
+}
+
static HDDEDATA CALLBACK DdeCallback(UINT type, UINT format, HCONV hConv, HSZ hsz1, HSZ hsz2,
HDDEDATA hDDEData, ULONG_PTR data1, ULONG_PTR data2)
{
@@ -233,6 +243,9 @@ static void CheckFileExistsInProgramGroups(const char *nameToCheck, int shouldEx
DWORD attributes;
int len;
+ if (!pSHGetSpecialFolderPathA)
+ return;
+
path = HeapAlloc(GetProcessHeap(), 0, MAX_PATH);
if (path != NULL)
{
@@ -243,13 +256,13 @@ static void CheckFileExistsInProgramGroups(const char *nameToCheck, int shouldEx
if (testParams & DDE_TEST_COMMON)
{
specialFolder = CSIDL_COMMON_PROGRAMS;
- err = SHGetSpecialFolderPath(NULL, path, specialFolder, FALSE);
+ err = pSHGetSpecialFolderPathA(NULL, path, specialFolder, FALSE);
/* Win 9x fails, use CSIDL_PROGRAMS (err == FALSE) */
}
if (err == FALSE)
{
specialFolder = CSIDL_PROGRAMS;
- err = SHGetSpecialFolderPath(NULL, path, specialFolder, FALSE);
+ err = pSHGetSpecialFolderPathA(NULL, path, specialFolder, FALSE);
}
len = strlen(path) + strlen(nameToCheck)+1;
if (groupName != NULL)
@@ -526,6 +539,12 @@ START_TEST(progman_dde)
HCONV hConv;
int testnum;
+ init_function_pointers();
+
+ /* Only report this once */
+ if (!pSHGetSpecialFolderPathA)
+ win_skip("SHGetSpecialFolderPathA is not available\n");
+
/* Initialize DDE Instance */
err = DdeInitialize(&instance, DdeCallback, APPCMD_CLIENTONLY, 0);
ok (err == DMLERR_NO_ERROR, "DdeInitialize Error %s\n", GetStringFromError(err));
More information about the wine-cvs
mailing list