Ejemplo n.º 1
0
        public MemoryInfo GetMemoryInfo()
        {
            MemoryInfo.Native native = new MemoryInfo.Native();
            native.cb = (uint)Marshal.SizeOf <MemoryInfo.Native>();

            bool success = GetProcessMemoryInfo(handle, ref native, native.cb);

            if (!success)
            {
                throw new Win32Exception();
            }
            return(native.AsManaged());
        }
Ejemplo n.º 2
0
 internal static unsafe extern bool GetProcessMemoryInfo(SafeProcessHandle handle, ref MemoryInfo.Native native, uint cb);