コード例 #1
0
ファイル: marshal.cs プロジェクト: ydunk/masters
        public static IntPtr AllocHGlobal(IntPtr cb)
        {
            IntPtr pNewMem = Win32Native.LocalAlloc(LMEM_FIXED, cb);

            if (pNewMem == Win32Native.NULL)
            {
                throw new OutOfMemoryException();
            }
            return(pNewMem);
        }