?
Solved

EAcessViolation Error

Posted on 1997-08-16
4
Medium Priority
?
263 Views
Last Modified: 2010-04-03
I'am a italian beginner of delphi 2.0 and I have a problem:

Executing this command:
   WinExec('ARJ.EXE x -va -r -y C:\*.ARJ C:\PROVA',                                                                                              SW_MINIMIZE);
or this command:
   ShellExecute(0,'Open','ARJ.EXE','x -va -r -y :\*.arj c:\prova','',                                                                                                       SW_MINIMIZE);

the ARJ is executed correctly but appeat this error message:

Project Prova.exe raised exception class EAccessViolation with message
'Access violation at address 455C3A44. Read of address 455C3A44'. Process
stopped. Use Step or Run to continue.

Changing the parameters of ARJ the address violated changing.

What is the problem?
Can you explain a possible solution, please?
thank you.
Gianmario Da Vià
nodil@hotmail.com
0
Comment
Question by:nodil
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 

Author Comment

by:nodil
ID: 1341622
Edited text of question
0
 

Expert Comment

by:chrb
ID: 1341623
What is comming after this command ?
0
 
LVL 3

Expert Comment

by:sperling
ID: 1341624
Please post some more code, there's nothing wrong with the snippets you've posted.

Regards,

Erik.
0
 
LVL 5

Accepted Solution

by:
ronit051397 earned 300 total points
ID: 1341625
If you process the arj command, and the next lines in your code refer to these files that were opened and/or to the compressed files then sometimes you have a problem becuase your delphi program continues to run while the arj process hasn't finished yet. Therefore you have to suspend the delphi program from stepping to the next code line until the arj process is finished.
For example if the next line is deleting *.arj then you'll get an error becuase these files are locked until all opening is done.
To suspend the delphi program create some loop, say with the
application.processmessages method, or use a timer.
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses
Course of the Month8 days, 6 hours left to enroll

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question