mirror of https://github.com/dahall/Vanara.git
Fixed the DsFreeSpnArray function signature, as it was corrupting the native heap. (#382)
parent
153533f7e0
commit
3664bd2a8d
|
@ -1545,7 +1545,7 @@ namespace Vanara.PInvoke
|
|||
// *rpszSpn );
|
||||
[DllImport(Lib.NTDSApi, SetLastError = false, CharSet = CharSet.Auto)]
|
||||
[PInvokeData("ntdsapi.h", MSDNShortId = "1c229933-432d-4ded-be3b-3bd339a0abe4")]
|
||||
public static extern void DsFreeSpnArray(uint cSpn, ref SpnArrayHandle rpszSpn);
|
||||
public static extern void DsFreeSpnArray(uint cSpn, SpnArrayHandle rpszSpn);
|
||||
|
||||
/// <summary>
|
||||
/// The <c>DsGetDomainControllerInfo</c> function retrieves data about the domain controllers in a domain.
|
||||
|
|
|
@ -84,7 +84,7 @@ namespace Vanara.PInvoke.Tests
|
|||
uint uSpn = 1;
|
||||
ret = DsGetSpn(DS_SPN_NAME_TYPE.DS_SPN_NB_HOST, "cxhndl", null, 0, 0, null, null, ref uSpn, out var hA);
|
||||
ret.ThrowIfFailed();
|
||||
DsFreeSpnArray(uSpn, ref hA);
|
||||
DsFreeSpnArray(uSpn, hA);
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
|
Loading…
Reference in New Issue