Hello Joris,
On 06/26/2014 01:13 AM, Joris van der Wel wrote:
+#define CHECK_DACL_IS_NULL(o) \
- do{ \
SECURITY_DESCRIPTOR *queriedSD = NULL; \
PACL queriedAcl = NULL; \
BOOL dacl_present; \
BOOL dacl_defaulted; \
SECURITY_DESCRIPTOR_CONTROL control; \
DWORD revision; \
queriedSD = test_get_security_descriptor( o, __LINE__ ); \
queriedAcl = (PACL)0xdeadbeef; \
res = GetSecurityDescriptorDacl(queriedSD, &dacl_present, &queriedAcl, &dacl_defaulted); \
ok(res, "GetSecurityDescriptorDacl failed with error %d\n", GetLastError()); \
res = GetSecurityDescriptorControl(queriedSD, &control, &revision); \
ok(res, "GetSecurityDescriptorControl failed with error %d\n", GetLastError()); \
ok(dacl_present, "DACL should be present (even though the DACL is NULL)\n"); \
ok(queriedAcl == NULL, "Setting a NULL DACL, should also return a NULL DACL\n"); \
ok(!dacl_defaulted, "Defaulted is true\n"); \
ok((control & SE_DACL_DEFAULTED) == 0, "SE_DACL_DEFAULTED is set\n"); \
HeapFree(GetProcessHeap(), 0, queriedSD); \
- }while(0)
please try to avoid monster macros and use separate functions instead. You can still use a macro to pass __LINE__ to the function and use ok(__FILE__, line)(...) inside that function.
bye michael