string filename; Process[] procs = Process.GetProcesses() ; foreach (Process prc in procs) { if (procs.Length > 0) { int id = prc.Id; IEnumerator<filesysteminfo> fie = DetectOpenFiles.GetOpenFilesEnumerator(id); while (fie.MoveNext()) { if (fie.Current.Extension.ToLower(CultureInfo.InvariantCulture) == ".mp3") { filename = fie.Current.FullName; break; // TODO: might not be correct. Was : Exit While } } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)