Пример #1
0
        public static IMalloc GetMalloc()
        {
            IntPtr ptrRet;

            ShellApi.SHGetMalloc(out ptrRet);

            Object  obj     = Marshal.GetTypedObjectForIUnknown(ptrRet, GetMallocType());
            IMalloc imalloc = (IMalloc)obj;

            return(imalloc);
        }