File tree Expand file tree Collapse file tree
NtObjectManager/Cmdlets/Accessible Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -307,7 +307,7 @@ public static IEnumerable<NtWnf> GetRegisteredNotifications()
307307 /// <summary>
308308 /// Get if the state has subscribers.
309309 /// </summary>
310- public bool SubscribersPresent => Query < int > ( StateName , WnfStateNameInformation . SubscribersPresent , true ) . Result != 0 ;
310+ public bool SubscribersPresent => GetSubscribersPresent ( true ) . Result ;
311311
312312 /// <summary>
313313 /// Get the security descriptor for this object, if known.
@@ -439,6 +439,15 @@ public void DeleteStateData()
439439 DeleteStateData ( IntPtr . Zero ) ;
440440 }
441441
442+ /// <summary>
443+ /// Get if the state has subscribers.
444+ /// </summary>
445+ /// <param name="throw_on_error">True to throw on error.</param>
446+ /// <returns>The status of subscribers.</returns>
447+ public NtResult < bool > GetSubscribersPresent ( bool throw_on_error )
448+ {
449+ return Query < int > ( StateName , WnfStateNameInformation . SubscribersPresent , throw_on_error ) . Map ( i => i != 0 ) ;
450+ }
442451 #endregion
443452
444453 /// <summary>
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ internal WnfAccessCheckResult(NtWnf wnf,
4646 {
4747 StateName = wnf . StateName ;
4848 Lifetime = wnf . Lifetime ;
49- SubscribersPresent = wnf . SubscribersPresent ;
49+ SubscribersPresent = wnf . GetSubscribersPresent ( false ) . GetResultOrDefault ( ) ;
5050 }
5151 }
5252}
You can’t perform that action at this time.
0 commit comments