Skip to content
This repository has been archived by the owner on Jul 26, 2023. It is now read-only.

Fix bad p/invoke definition of NetUserEnum #511

Merged
merged 1 commit into from
Jul 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/NetApi32/NetApi32+NetUserEnumFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace PInvoke
public partial class NetApi32
{
/// <summary>
/// Allowed values for the filter parameter of the <see cref="NetUserEnum(string, NetUserEnumLevel, NetUserEnumFilter, byte*, uint, out uint, out uint, ref uint)"/> function.
/// Allowed values for the filter parameter of the <see cref="NetUserEnum(char*, NetUserEnumLevel, NetUserEnumFilter, out void*, uint, out uint, out uint, uint*)"/> function.
/// </summary>
[Flags]
public enum NetUserEnumFilter : uint
Expand Down
2 changes: 1 addition & 1 deletion src/NetApi32/NetApi32+NetUserEnumLevel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace PInvoke
public partial class NetApi32
{
/// <summary>
/// Allowed values for the level parameter of the <see cref="NetUserEnum(string, NetUserEnumLevel, NetUserEnumFilter, byte*, uint, out uint, out uint, ref uint)"/> function.
/// Allowed values for the level parameter of the <see cref="NetUserEnum(char*, NetUserEnumLevel, NetUserEnumFilter, out void*, uint, out uint, out uint, uint*)"/> function.
/// </summary>
public enum NetUserEnumLevel : uint
{
Expand Down
6 changes: 3 additions & 3 deletions src/NetApi32/NetApi32.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ public static partial class NetApi32
/// </returns>
[DllImport(nameof(NetApi32), CharSet = CharSet.Unicode)]
public static extern unsafe Win32ErrorCode NetUserEnum(
string servername,
[Friendly(FriendlyFlags.In | FriendlyFlags.Array)] char* servername,
NetUserEnumLevel level,
NetUserEnumFilter filter,
[Friendly(FriendlyFlags.Array)] byte* bufptr,
out void* bufptr,
uint prefmaxlen,
out uint entriesread,
out uint totalentries,
ref uint resume_handle);
[Friendly(FriendlyFlags.Bidirectional | FriendlyFlags.Optional)] uint* resume_handle);

/// <summary>
/// The NetApiBufferFree function frees the memory that the NetApiBufferAllocate function allocates. Applications should also call NetApiBufferFree to free the memory that other network management functions use internally to return information.
Expand Down
3 changes: 0 additions & 3 deletions src/NetApi32/PublicAPI.Shipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,5 @@ PInvoke.NetApi32.USER_INFO_1.usri1_script_path_IntPtr.set -> void
const PInvoke.NetApi32.MAX_PREFERRED_LENGTH = 4294967295 -> uint
static PInvoke.NetApi32.NetApiBufferAllocate(int ByteCount, out System.IntPtr Buffer) -> PInvoke.Win32ErrorCode
static PInvoke.NetApi32.NetApiBufferFree(System.IntPtr Buffer) -> PInvoke.Win32ErrorCode
static PInvoke.NetApi32.NetUserEnum(string servername, PInvoke.NetApi32.NetUserEnumLevel level, PInvoke.NetApi32.NetUserEnumFilter filter, System.IntPtr bufptr, uint prefmaxlen, out uint entriesread, out uint totalentries, ref uint resume_handle) -> PInvoke.Win32ErrorCode
static PInvoke.NetApi32.NetUserEnum(string servername, PInvoke.NetApi32.NetUserEnumLevel level, PInvoke.NetApi32.NetUserEnumFilter filter, byte[] bufptr, uint prefmaxlen, out uint entriesread, out uint totalentries, ref uint resume_handle) -> PInvoke.Win32ErrorCode
static extern PInvoke.NetApi32.NetApiBufferAllocate(int ByteCount, out void* Buffer) -> PInvoke.Win32ErrorCode
static extern PInvoke.NetApi32.NetApiBufferFree(void* Buffer) -> PInvoke.Win32ErrorCode
static extern PInvoke.NetApi32.NetUserEnum(string servername, PInvoke.NetApi32.NetUserEnumLevel level, PInvoke.NetApi32.NetUserEnumFilter filter, byte* bufptr, uint prefmaxlen, out uint entriesread, out uint totalentries, ref uint resume_handle) -> PInvoke.Win32ErrorCode
4 changes: 4 additions & 0 deletions src/NetApi32/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
static PInvoke.NetApi32.NetUserEnum(System.IntPtr servername, PInvoke.NetApi32.NetUserEnumLevel level, PInvoke.NetApi32.NetUserEnumFilter filter, out System.IntPtr bufptr, uint prefmaxlen, out uint entriesread, out uint totalentries, System.IntPtr resume_handle) -> PInvoke.Win32ErrorCode
static PInvoke.NetApi32.NetUserEnum(char[] servername, PInvoke.NetApi32.NetUserEnumLevel level, PInvoke.NetApi32.NetUserEnumFilter filter, out System.IntPtr bufptr, uint prefmaxlen, out uint entriesread, out uint totalentries, ref uint? resume_handle) -> PInvoke.Win32ErrorCode
static PInvoke.NetApi32.NetUserEnum(char[] servername, PInvoke.NetApi32.NetUserEnumLevel level, PInvoke.NetApi32.NetUserEnumFilter filter, out void* bufptr, uint prefmaxlen, out uint entriesread, out uint totalentries, ref uint? resume_handle) -> PInvoke.Win32ErrorCode
static extern PInvoke.NetApi32.NetUserEnum(char* servername, PInvoke.NetApi32.NetUserEnumLevel level, PInvoke.NetApi32.NetUserEnumFilter filter, out void* bufptr, uint prefmaxlen, out uint entriesread, out uint totalentries, uint* resume_handle) -> PInvoke.Win32ErrorCode