[PATCH 2/2] Run tests again on NT4
Paul Vriens
Paul.Vriens.Wine at gmail.com
Wed Nov 11 02:09:29 CST 2009
---
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..b54bb3d 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));
--
1.6.2.5
--------------070003060106020606020101--
More information about the wine-patches
mailing list