File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
NtObjectManager/Cmdlets/Accessible Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -307,7 +307,7 @@ public static IEnumerable<NtWnf> GetRegisteredNotifications()
307
307
/// <summary>
308
308
/// Get if the state has subscribers.
309
309
/// </summary>
310
- public bool SubscribersPresent => Query < int > ( StateName , WnfStateNameInformation . SubscribersPresent , true ) . Result != 0 ;
310
+ public bool SubscribersPresent => GetSubscribersPresent ( true ) . Result ;
311
311
312
312
/// <summary>
313
313
/// Get the security descriptor for this object, if known.
@@ -439,6 +439,15 @@ public void DeleteStateData()
439
439
DeleteStateData ( IntPtr . Zero ) ;
440
440
}
441
441
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
+ }
442
451
#endregion
443
452
444
453
/// <summary>
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ internal WnfAccessCheckResult(NtWnf wnf,
46
46
{
47
47
StateName = wnf . StateName ;
48
48
Lifetime = wnf . Lifetime ;
49
- SubscribersPresent = wnf . SubscribersPresent ;
49
+ SubscribersPresent = wnf . GetSubscribersPresent ( false ) . GetResultOrDefault ( ) ;
50
50
}
51
51
}
52
52
}
You can’t perform that action at this time.
0 commit comments