Alexandre Julliard wrote:
@@ -132,6 +133,15 @@ static int event_satisfied( struct objec return 0; /* Not abandoned */ }
+static unsigned int event_map_access( struct object *obj, unsigned int access ) +{
- if (access & GENERIC_READ) access |= STANDARD_RIGHTS_READ | SYNCHRONIZE | EVENT_QUERY_STATE;
- if (access & GENERIC_WRITE) access |= STANDARD_RIGHTS_WRITE;
- if (access & GENERIC_EXECUTE) access |= STANDARD_RIGHTS_EXECUTE;
- if (access & GENERIC_ALL) access |= STANDARD_RIGHTS_ALL | EVENT_ALL_ACCESS;
- return access & ~(GENERIC_READ | GENERIC_WRITE | GENERIC_EXECUTE | GENERIC_ALL);
+}
static int event_signal( struct object *obj, unsigned int access ) { struct event *event = (struct event *)obj;
Why did you decide to rely on another function to map the access rights? It seems that none of the objects' mappings depend on any state in the object, so couldn't you have just put the access rights that GENERIC_READ, GENERIC_WRITE, GENERIC_EXECUTE and GENERIC_ALL map to somewhere associated with the object and have just one mapping function.