Exemplo n.º 1
0
        public static List <FileApi> GetFiles(Process process)
        {
            List <Win32API.SYSTEM_HANDLE_INFORMATION> lstHandles = new List <Win32API.SYSTEM_HANDLE_INFORMATION>();

            lstHandles = GetHandles(process);

            List <FileApi> lstFileHandles = new List <FileApi>();

            foreach (Win32API.SYSTEM_HANDLE_INFORMATION hand in lstHandles)
            {
                try
                {
                    FileApi file = new FileApi(hand);
                    if (file.Name != null && file.Name != "")
                    {
                        lstFileHandles.Add(file);
                    }
                }
                catch (Exception ex) { }
            }
            return(lstFileHandles);
        }
Exemplo n.º 2
0
        public static List<FileApi> GetFiles(Process process)
        {
            List<Win32API.SYSTEM_HANDLE_INFORMATION> lstHandles = new List<Win32API.SYSTEM_HANDLE_INFORMATION>();
            lstHandles = GetHandles(process);

            List<FileApi> lstFileHandles = new List<FileApi>();

            foreach (Win32API.SYSTEM_HANDLE_INFORMATION hand in lstHandles)
            {
                try
                {
                    FileApi file = new FileApi(hand);
                    if (file.Name != null && file.Name != "")
                    {
                        lstFileHandles.Add(file);
                    }
                }
                catch (Exception ex) { }
            }
            return lstFileHandles;
        }