Пример #1
0
        internal static SafeLocalAllocHandle LocalAlloc(int cb)
        {
            SafeLocalAllocHandle localAllocHandle = Kernel32.LocalAlloc(0, (UIntPtr)((ulong)cb));

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