VOID SeOpenObjectAuditAlarm( __in PUNICODE_STRING ObjectTypeName, __in_opt PVOID Object, __in_opt PUNICODE_STRING AbsoluteObjectName, __in PSECURITY_DESCRIPTOR SecurityDescriptor, __in PACCESS_STATE AccessState, __in BOOLEAN ObjectCreated, __in BOOLEAN AccessGranted, __in KPROCESSOR_MODE AccessMode, __out PBOOLEAN GenerateOnClose ); Routine Description: SeOpenObjectAuditAlarm is used by the object manager that open objects to generate any necessary audit or alarm messages. The open may be to existing objects or for newly created objects. No messages will be generated for Kernel mode accesses. This routine is used to generate audit and alarm messages when an attempt is made to open an object. This routine may result in several messages being generated and sent to Port objects. This may result in a significant latency before returning. Design of routines that must call this routine must take this potential latency into account. This may have an impact on the approach taken for data structure mutex locking, for example. Arguments: ObjectTypeName - Supplies the name of the type of object being accessed. This must be the same name provided to the ObCreateObjectType service when the object type was created. Object - Address of the object accessed. This value will not be used as a pointer (referenced). It is necessary only to enter into log messages. If the open was not successful, then this argument is ignored. Otherwise, it must be provided. AbsoluteObjectName - Supplies the name of the object being accessed. If the object doesn't have a name, then this field is left null. Otherwise, it must be provided. SecurityDescriptor - A pointer to the security descriptor of the object being accessed. AccessState - A pointer to an access state structure containing the subject context, the remaining desired access types, the granted access types, and optionally a privilege set to indicate which privileges were used to permit the access. ObjectCreated - A boolean flag indicating whether the access resulted in a new object being created. A value of TRUE indicates an object was created, FALSE indicates an existing object was opened. AccessGranted - Indicates if the access was granted or denied based on the access check or privilege check. AccessMode - Indicates the access mode used for the access check. One of UserMode or KernelMode. Messages will not be generated by kernel mode accesses. GenerateOnClose - Points to a boolean that is set by the audit generation routine and must be passed to SeCloseObjectAuditAlarm() when the object handle is closed. Return value: None.