Go Back   FileForums > Game Backup > SEGA > DC Games

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7  
Old 15-09-2004, 12:48
Team Crystal Team Crystal is offline
Banned
 
Join Date: Jun 2004
Location: Brazil
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Team Crystal is on a distinguished road
Arrow

Quote:
Originally Posted by Megalexxx
It won't be enough...

Create a thread (look for it in Delphi's help), and then, call your converter inside this thread.
Look, i was doing this?

for i:=1 to Lst_Items.Items.Count do

(verify itens. Count one, by one)

begin

frm_adx2mp3.Update; (i tried to use this method to avoid white screens, but it doesn't works. ._.)

Origem:=GetShortFileName(Lst_Items.Items[0].caption)+' '+GetShortFileName(Relativo)+ExtractName(Extractfi lename(Lst_Items.Items[0].Caption))+'.mp3';

(var that receives the source of the ADX files and rename then to MP3 with the destiny selected at the start of this procedure)

ExecAndWait(Pchar(Aplicativo), Pchar(Origem), SW_HIDE);

(runs the funtion ExecAndWait to run the program and wait for the end to continue. The variable Aplicativo have received a string source of the program with the function at start of this procedure:

Aplicativo:=ExtractFilePath( Application.ExeName )+'NAME OF APLICATON'

Lst_Items.items[0].delete;

(delete the first item of the list, to the program run the next one)
end;

----

function ExecAndWait(const FileName, Params: string;
const WindowState: Word): boolean;
var
SUInfo: TStartupInfo;
ProcInfo: TProcessInformation;
CmdLine: string;
begin
CmdLine := '"' + Filename + '"' + Params;
FillChar(SUInfo, SizeOf(SUInfo), #0);
with SUInfo do begin
cb := SizeOf(SUInfo);
dwFlags := STARTF_USESHOWWINDOW;
wShowWindow := WindowState;
end;
Result := CreateProcess(nil, PChar(CmdLine), nil, nil, false,
CREATE_NEW_CONSOLE or NORMAL_PRIORITY_CLASS, nil,
PChar(ExtractFilePath(Filename)), SUInfo, ProcInfo);


if Result then begin
WaitForSingleObject(ProcInfo.hProcess, INFINITE);

CloseHandle(ProcInfo.hProcess);
CloseHandle(ProcInfo.hThread);
end;
end;

This was the function that i have used to use an external program.

---

I have an ideia! =)
Can you give me an example to avoid this with another type of program?
If you still on my place, what you will do?

Last edited by Team Crystal; 15-09-2004 at 12:50.
Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Enter the matrix and large game fix timex XBox Games 10 07-03-2004 13:55
Generic Pal 2 Ntsc Patcher ? captainvik XBox Games 6 23-12-2003 20:51
Pal Patcher Question Odity DC Games 5 07-09-2003 08:44
Where to find latest version of PAL Patcher? Bursk DC Games 5 24-09-2002 08:20
Napalm Patcher boba fett PSX Games 0 12-03-2001 22:52



All times are GMT -7. The time now is 10:02.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com