advapi32: more LsaQueryInformationPolicy tests

Robert Reif reif at earthlink.net
Tue Aug 1 06:35:54 CDT 2006


-------------- next part --------------
diff -p -u -r1.2 lsa.c
--- dlls/advapi32/tests/lsa.c	23 May 2006 12:47:29 -0000	1.2
+++ dlls/advapi32/tests/lsa.c	1 Aug 2006 11:33:22 -0000
@@ -66,12 +66,34 @@ static void test_lsa(void)
     ok(status == STATUS_SUCCESS, "LsaOpenPolicy() returned 0x%08lx\n", status);
 
     if (status == STATUS_SUCCESS) {
-        PPOLICY_PRIMARY_DOMAIN_INFO domain_info;
+        PPOLICY_AUDIT_EVENTS_INFO audit_events_info;
+        PPOLICY_PRIMARY_DOMAIN_INFO primary_domain_info;
+        PPOLICY_ACCOUNT_DOMAIN_INFO account_domain_info;
+        PPOLICY_DNS_DOMAIN_INFO dns_domain_info;
 
-        status = pLsaQueryInformationPolicy(handle, PolicyPrimaryDomainInformation, (PVOID*)&domain_info);
-        ok(status == STATUS_SUCCESS, "LsaQueryInformationPolicy() failed, returned 0x%08lx\n", status);
-        if (status == STATUS_SUCCESS)
-            pLsaFreeMemory((LPVOID)domain_info);
+        status = pLsaQueryInformationPolicy(handle, PolicyAuditEventsInformation, (PVOID*)&audit_events_info);
+        ok(status == STATUS_SUCCESS, "LsaQueryInformationPolicy(PolicyAuditEventsInformation) failed, returned 0x%08lx\n", status);
+        if (status == STATUS_SUCCESS) {
+            pLsaFreeMemory((LPVOID)audit_events_info);
+        }
+
+        status = pLsaQueryInformationPolicy(handle, PolicyPrimaryDomainInformation, (PVOID*)&primary_domain_info);
+        ok(status == STATUS_SUCCESS, "LsaQueryInformationPolicy(PolicyPrimaryDomainInformation) failed, returned 0x%08lx\n", status);
+        if (status == STATUS_SUCCESS) {
+            pLsaFreeMemory((LPVOID)primary_domain_info);
+        }
+
+        status = pLsaQueryInformationPolicy(handle, PolicyAccountDomainInformation, (PVOID*)&account_domain_info);
+        ok(status == STATUS_SUCCESS, "LsaQueryInformationPolicy(PolicyAccountDomainInformation) failed, returned 0x%08lx\n", status);
+        if (status == STATUS_SUCCESS) {
+            pLsaFreeMemory((LPVOID)account_domain_info);
+        }
+
+        status = pLsaQueryInformationPolicy(handle, PolicyDnsDomainInformation, (PVOID*)&dns_domain_info);
+        ok(status == STATUS_SUCCESS, "LsaQueryInformationPolicy(PolicyDnsDomainInformation) failed, returned 0x%08lx\n", status);
+        if (status == STATUS_SUCCESS) {
+            pLsaFreeMemory((LPVOID)dns_domain_info);
+        }
 
         status = pLsaClose(handle);
         ok(status == STATUS_SUCCESS, "LsaClose() failed, returned 0x%08lx\n", status);


More information about the wine-patches mailing list