当前位置:网站首页>Raised exception class eaccexviolation with 'access violation at address 45efd5 in module error

Raised exception class eaccexviolation with 'access violation at address 45efd5 in module error

2022-04-23 14:35:00 lyhoo163

Programming debugging error :

Project StartOH.exe raised exception class EAccexxViolation with 'Access violation at address 45EFD5 in module 'StartOh.exe. Read od address 00000170'. Process stopped. Uses Step or Run to continue.

The program calls A.EXE Documents before , Need to call before , Exit its thread , Enter again .

1、function FindTask(ExeFileName: string): Boolean;    // Find the running process
2、function KillTask(ExeFileName: string): Integer;        // Close the running process

Original call :

if FindTask('OldHome.exe') then KillTask('OldHome.exe');

reason : Two functions respectively   Thread operation , Same code , An interference error occurred , Modify call :

  if FindTask('OldHome.exe') then
  begin
    sleep(500);
    KillTask('OldHome.exe');
  end;

Reason two functions are executed simultaneously , conflict . Do a delay to resolve the conflict .

版权声明
本文为[lyhoo163]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231433442189.html