Solved

EAcessViolation Error

Posted on 1997-08-16
4
256 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
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 100 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

758 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now