From d0cdc29543b588fcfb53c63855cc404bbca6541b Mon Sep 17 00:00:00 2001 From: dahall Date: Mon, 4 Oct 2021 15:52:15 -0600 Subject: [PATCH] Added SafePSECURITY_DESCRIPTOR.ToString(SECURITY_INFO) overload --- PInvoke/Security/AdvApi32/WinNT.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/PInvoke/Security/AdvApi32/WinNT.cs b/PInvoke/Security/AdvApi32/WinNT.cs index 11cc962d..bc3c912f 100644 --- a/PInvoke/Security/AdvApi32/WinNT.cs +++ b/PInvoke/Security/AdvApi32/WinNT.cs @@ -4968,7 +4968,15 @@ namespace Vanara.PInvoke /// Returns a that represents this instance. /// A that represents this instance. - public override string ToString() => ConvertSecurityDescriptorToStringSecurityDescriptor(handle, defSecInfo); + public override string ToString() => ToString(defSecInfo); + + /// Returns a that represents this instance. + /// + /// Specifies a combination of the SECURITY_INFORMATION bit flags to indicate the components of the security descriptor to include in + /// the output string. + /// + /// A that represents this instance. + public string ToString(SECURITY_INFORMATION secInfo) => ConvertSecurityDescriptorToStringSecurityDescriptor(handle, secInfo); } }