0

I want to make an application run slower, it that possible? I have created application which read file created by another process but that process create file and delete it so fast, so it is possible to make that application be slow so I can read file faster?

I tried

SetPriorityClass(GetProcessHandleByName("dd.exe"), IDLE_PRIORITY_CLASS);

and set my process to

SetPriorityClass(GetCurrentProcess(), REALTIME_PRIORITY_CLASS);

but yet the process run faster it is possible to slow it down? thanks.

Jarod42
  • 203,559
  • 14
  • 181
  • 302
Vedbex
  • 47
  • 2
  • 8
  • 5
    Wrong. The correct fix is not to make that application run slower. The correct fix is to make that application leave a copy of its output file, instead of deleting it. – Sam Varshavchik Jul 31 '17 at 01:24
  • and how to control that application? its not made by me and i don't have its code. – Vedbex Jul 31 '17 at 01:33
  • You may lock the file when reading it, so deleting it would fail. – Jarod42 Jul 31 '17 at 01:42
  • I already tried that, but the file getting created and deleted very fast and the file size is large the only way am able to see the file is using HIPS which freeze the application after every action the application does, but i don't want to use exterenal app. – Vedbex Jul 31 '17 at 01:44
  • Then you can't do it. It's as simple as that. – Sam Varshavchik Jul 31 '17 at 10:56

2 Answers2

0

See the answer SO : Suspend/Resume a process. Which gives information on the three choices for suspending an application.

They are basically stop each thread. Use the undocumented SuspendProcess and Debug the process.

These are the methods of substantially delaying the process.

mksteve
  • 12,614
  • 3
  • 28
  • 50
0

Modifying the working directory permissions to allow processes to read/write data to new files, but not modify/delete existing files might be a different approach that would work.

See https://superuser.com/questions/745923/ntfs-permissions-create-files-and-folder-but-prevent-deletion-and-modification

jla
  • 4,191
  • 3
  • 27
  • 44