-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
take advantage of SpanMarshalling for ADsGetLastError
suggested by review comment #93722 (comment)
- Loading branch information
1 parent
1428673
commit 497bbb6
Showing
3 changed files
with
12 additions
and
9 deletions.
There are no files selected for viewing
5 changes: 3 additions & 2 deletions
5
src/libraries/Common/src/Interop/Windows/Activeds/Interop.ADsGetLastError.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using System; | ||
using System.Runtime.InteropServices; | ||
|
||
internal static partial class Interop | ||
{ | ||
internal static partial class Activeds | ||
{ | ||
[LibraryImport(Libraries.Activeds, StringMarshalling = StringMarshalling.Utf16)] | ||
internal static unsafe partial int ADsGetLastError(out int error, char* errorBuffer, int errorBufferLength, char* nameBuffer, int nameBufferLength); | ||
[LibraryImport(Libraries.Activeds)] | ||
internal static partial int ADsGetLastError(out int error, Span<char> errorBuffer, int errorBufferLength, Span<char> nameBuffer, int nameBufferLength); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters