I am trying to use the iphlpapi.dll within a Unity3d UWP App on the Hololens 2. When I create a standalone UWP C# App and run it on the HL, it works fine and I can use the dll.
When I compile the Unity3d project, it doesn't work. The dll is loaded automatically on App start by the Hololens from
C:\Windows\SysArm\
but the DLLImport I've used successfully in the standalone UWP App doesn't work.
Apologies for the lack of code, I'm no longer in the office but the example I've used is from here:
C# - Get mac address in Universal Apps
Any pointers would be very helpful!
Many thanks, Peter
EDIT:
@Hernando
The problem occurs in runtime on the HL device once the IL2CPP has built. The version of Unity is 2018.4.12f1. The error occurs as the code attempts to use the DLLImport:
[DllImport("iphlpapi.dll", CharSet = CharSet.Ansi, ExactSpelling = true)]
private static extern int GetAdaptersInfo(IntPtr pAdapterInfo, ref Int64 pBufOutLen);
The exception is DLL not found but on the standalone UWP app with identical code, it works.