psapi.dll tests

Ferenc Wagner wferi at
Thu Jul 1 11:48:44 CDT 2004

Uwe Bonnes <bon at> writes:

> Ferenc Wagner <wferi at> writes:
>> Hi, please somebody enlighten me!  How does this test
>> work once psapi_test.exe is linked with -lpsapi?  How can
>> a program start at all without one of its hard
>> dependencies?
>> START_TEST(module)
>> {
>>     dll = LoadLibrary("psapi.dll");
>>     if (!dll) {
>>         trace("LoadLibraryA(psapi.dll) failed: skipping tests with target module\n");
>>         return;
>>     }
>> The above seems to be a common idiom which I don't
>> understand as opposed to using GetProcAddress and
>> invoking functions through pointers.  What am I missing
>> here?
> If the library is already loaded, LoadLibrary returns the
> HModule of the already loaded module, to my knowledge...

Fine, but what for?  Once this code is given control we can
be sure that run-time linking is done, ie. psapi.dll was
found and loaded.  What do we test then?

More information about the wine-devel mailing list