netapi32/tests: Use GetModuleHandle and skip.
This commit is contained in:
parent
8cf9d7c9cb
commit
5770f3e30d
|
@ -78,15 +78,12 @@ START_TEST(ds)
|
||||||
{
|
{
|
||||||
HMODULE hnetapi32;
|
HMODULE hnetapi32;
|
||||||
|
|
||||||
hnetapi32 = LoadLibraryA("netapi32.dll");
|
hnetapi32 = GetModuleHandleA("netapi32.dll");
|
||||||
if (!hnetapi32)
|
|
||||||
return;
|
|
||||||
|
|
||||||
SetLastError(0xdeadbeef);
|
|
||||||
pDsRoleGetPrimaryDomainInformation=(void*)GetProcAddress(hnetapi32,"DsRoleGetPrimaryDomainInformation");
|
pDsRoleGetPrimaryDomainInformation=(void*)GetProcAddress(hnetapi32,"DsRoleGetPrimaryDomainInformation");
|
||||||
if (!pDsRoleGetPrimaryDomainInformation)
|
if (!pDsRoleGetPrimaryDomainInformation)
|
||||||
{
|
{
|
||||||
trace("DsRoleGetPrimaryDomainInformation not implemented : (%d), stop testing\n", GetLastError());
|
skip("DsRoleGetPrimaryDomainInformation is not available\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
pDsRoleFreeMemory=(void*)GetProcAddress(hnetapi32,"DsRoleFreeMemory");
|
pDsRoleFreeMemory=(void*)GetProcAddress(hnetapi32,"DsRoleFreeMemory");
|
||||||
|
|
Loading…
Reference in New Issue