Skip to content

Commit

Permalink
Prevent exceptions with a 'Success' message when there is a problem w…
Browse files Browse the repository at this point in the history
…ith permissions (dotnet#78555)
  • Loading branch information
simonrozsival authored Nov 30, 2022
1 parent 1ca454e commit 320528e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public static unsafe partial int EnumerateInterfaceAddresses(
[LibraryImport(Libraries.SystemNative, EntryPoint = "SystemNative_EnumerateGatewayAddressesForInterface")]
public static unsafe partial int EnumerateGatewayAddressesForInterface(void* context, uint interfaceIndex, delegate* unmanaged<void*, IpAddressInfo*, void> onGatewayFound);

[LibraryImport(Libraries.SystemNative, EntryPoint = "SystemNative_GetNetworkInterfaces")]
[LibraryImport(Libraries.SystemNative, EntryPoint = "SystemNative_GetNetworkInterfaces", SetLastError = true)]
public static unsafe partial int GetNetworkInterfaces(int* count, NetworkInterfaceInfo** addrs, int* addressCount, IpAddressInfo** aa);

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public enum NetworkChangeKind
AvailabilityChanged = 2
}

[LibraryImport(Libraries.SystemNative, EntryPoint = "SystemNative_CreateNetworkChangeListenerSocket")]
[LibraryImport(Libraries.SystemNative, EntryPoint = "SystemNative_CreateNetworkChangeListenerSocket", SetLastError = true)]
public static unsafe partial Error CreateNetworkChangeListenerSocket(IntPtr* socket);

[LibraryImport(Libraries.SystemNative, EntryPoint = "SystemNative_ReadEvents")]
Expand Down

0 comments on commit 320528e

Please sign in to comment.