internal static SafeLocalAllocHandle LocalAlloc(int cb)
        {
            SafeLocalAllocHandle localAllocHandle = Kernel32.LocalAlloc(0, (UIntPtr)((ulong)cb));

            if (localAllocHandle.IsInvalid)
            {
                localAllocHandle.SetHandleAsInvalid();
                throw new OutOfMemoryException();
            }
            return(localAllocHandle);
        }
Beispiel #2
0
 internal static extern uint GetNetworkParams(SafeLocalAllocHandle pFixedInfo, ref uint pOutBufLen);
Beispiel #3
0
 internal static extern uint GetAdaptersAddresses(AddressFamily family, uint flags, IntPtr pReserved, SafeLocalAllocHandle adapterAddresses, ref uint outBufLen);