add support for slists

Dmitry Timoshkov dmitry at codeweavers.com
Wed Jan 24 03:02:28 CST 2007


"Damjan Jovanovic" <damjan.jov at gmail.com> wrote:

> +    kernel32 = LoadLibraryA("KERNEL32.DLL");

All the kernel32 tests are already implicitly linked to kernel32.dll,
therefore GetModuleHandle("kernel32.dll") is perfectly enough and is
guaranteed to succeed.

> +    if (kernel32 == NULL)
> +    {
> +        trace("couldn't open KERNEL32.DLL, skipping slist tests\n");
> +        return;
> +    }

There was a new Wine test function introduced to mark the skipped tests -
skip(), please use it when a test is going to be skipped for whatever reason.

> +    pInitializeSListHead = (void*) GetProcAddress(kernel32, "InitializeSListHead");
> +    pQueryDepthSList = (void*) GetProcAddress(kernel32, "QueryDepthSList");
> +    pInterlockedFlushSList = (void*) GetProcAddress(kernel32, "InterlockedFlushSList");
> +    pInterlockedPopEntrySList = (void*) GetProcAddress(kernel32, "InterlockedPopEntrySList");
> +    pInterlockedPushEntrySList = (void*) GetProcAddress(kernel32, "InterlockedPushEntrySList");
> +    if (pInitializeSListHead == NULL ||
> +        pQueryDepthSList == NULL ||
> +        pInterlockedFlushSList == NULL ||
> +        pInterlockedPopEntrySList == NULL ||
> +        pInterlockedPushEntrySList == NULL)
> +    {
> +        trace("some required slist entrypoints were not found, skipping tests\n");
> +        FreeLibrary(kernel32);
> +    }

A 'return;' is missing here, as well as a skip() call.

-- 
Dmitry.



More information about the wine-devel mailing list