internal static SafeLocalAllocHandle LocalAlloc(int cb) { SafeLocalAllocHandle localAllocHandle = Kernel32.LocalAlloc(0, (UIntPtr)((ulong)cb)); if (localAllocHandle.IsInvalid) { localAllocHandle.SetHandleAsInvalid(); throw new OutOfMemoryException(); } return(localAllocHandle); }
internal static extern uint GetNetworkParams(SafeLocalAllocHandle pFixedInfo, ref uint pOutBufLen);
internal static extern uint GetAdaptersAddresses(AddressFamily family, uint flags, IntPtr pReserved, SafeLocalAllocHandle adapterAddresses, ref uint outBufLen);