예제 #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);
        }