mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 10:13:56 +00:00
localspl/tests: Fallback to localmon.dll on NT4.0.
This commit is contained in:
parent
75fb678070
commit
73d36423f3
1 changed files with 14 additions and 4 deletions
|
@ -36,6 +36,7 @@
|
|||
/* ##### */
|
||||
|
||||
static HMODULE hdll;
|
||||
static HMODULE hlocalmon;
|
||||
static LPMONITOREX (WINAPI *pInitializePrintMonitor)(LPWSTR);
|
||||
|
||||
static LPMONITOREX pm;
|
||||
|
@ -74,16 +75,18 @@ static void test_InitializePrintMonitor(void)
|
|||
|
||||
SetLastError(0xdeadbeef);
|
||||
res = pInitializePrintMonitor(NULL);
|
||||
ok( (res == NULL) && (GetLastError() == ERROR_INVALID_PARAMETER),
|
||||
"returned %p with %d\n (expected NULL with " \
|
||||
/* The Parameter was unchecked before w2k */
|
||||
ok( res || (GetLastError() == ERROR_INVALID_PARAMETER),
|
||||
"returned %p with %d\n (expected '!= NULL' or: NULL with " \
|
||||
"ERROR_INVALID_PARAMETER)\n", res, GetLastError());
|
||||
|
||||
SetLastError(0xdeadbeef);
|
||||
res = pInitializePrintMonitor(emptyW);
|
||||
ok( (res == NULL) && (GetLastError() == ERROR_INVALID_PARAMETER),
|
||||
"returned %p with %d\n (expected NULL with " \
|
||||
ok( res || (GetLastError() == ERROR_INVALID_PARAMETER),
|
||||
"returned %p with %d\n (expected '!= NULL' or: NULL with " \
|
||||
"ERROR_INVALID_PARAMETER)\n", res, GetLastError());
|
||||
|
||||
|
||||
/* Every call with a non-empty string returns the same Pointer */
|
||||
SetLastError(0xdeadbeef);
|
||||
res = pInitializePrintMonitor(Monitors_LocalPortW);
|
||||
|
@ -107,6 +110,13 @@ START_TEST(localmon)
|
|||
if (!hdll) return;
|
||||
|
||||
pInitializePrintMonitor = (void *) GetProcAddress(hdll, "InitializePrintMonitor");
|
||||
if (!pInitializePrintMonitor) {
|
||||
/* The Monitor for "Local Ports" was in a seperate dll before w2k */
|
||||
hlocalmon = LoadLibraryA("localmon.dll");
|
||||
if (hlocalmon) {
|
||||
pInitializePrintMonitor = (void *) GetProcAddress(hlocalmon, "InitializePrintMonitor");
|
||||
}
|
||||
}
|
||||
if (!pInitializePrintMonitor) return;
|
||||
|
||||
/* Native localmon.dll / localspl.dll need a vaild Port-Entry in:
|
||||
|
|
Loading…
Reference in a new issue