netapi32/tests: Use GetModuleHandle and skip.

This commit is contained in:
Paul Vriens 2007-03-16 12:02:25 +01:00 committed by Alexandre Julliard
parent 8cf9d7c9cb
commit 5770f3e30d
1 changed files with 2 additions and 5 deletions

View File

@ -78,15 +78,12 @@ START_TEST(ds)
{
HMODULE hnetapi32;
hnetapi32 = LoadLibraryA("netapi32.dll");
if (!hnetapi32)
return;
hnetapi32 = GetModuleHandleA("netapi32.dll");
SetLastError(0xdeadbeef);
pDsRoleGetPrimaryDomainInformation=(void*)GetProcAddress(hnetapi32,"DsRoleGetPrimaryDomainInformation");
if (!pDsRoleGetPrimaryDomainInformation)
{
trace("DsRoleGetPrimaryDomainInformation not implemented : (%d), stop testing\n", GetLastError());
skip("DsRoleGetPrimaryDomainInformation is not available\n");
return;
}
pDsRoleFreeMemory=(void*)GetProcAddress(hnetapi32,"DsRoleFreeMemory");