Path: chuka.playstation.co.uk!news From: "Matt Verran" Newsgroups: scee.yaroze.freetalk.english Subject: loading an exe and using Exec() Date: Sun, 15 Apr 2001 10:23:17 +0100 Organization: PlayStation Net Yaroze (SCEE) Lines: 54 Message-ID: <9bbp7u$t451@www.netyaroze-europe.com> NNTP-Posting-Host: host213-122-25-161.btinternet.com X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Hi All I spent the whole of yesterday puzzling over this yaroze problem. I'm trying to load and execute an exe file from disk, which would allow yarozers the ability to play update disks (gta london, beatmania 2, 3, 4, 5, etc) without the original disk. I used the following code to (I think) successfully load the yaroze boot disk app and execute it: if( CdSearchFile(0, "\\DTL_S30.35;1") == 0 ) { printf("\n not found \n"); } else { printf("\n found \n"); exec_struct = CdReadExec( "\\DTL_S30.35;1" ); result = CdReadSync(0, 0); printf("\n loaded, result: %d \n\n", result); if (result==0) { printf("\n executing \n"); EnterCriticalSection(); Exec(exec_struct, 0, 0); ExitCriticalSection(); } } But all the other disks I tried, FF8, OPM coverdisks, beatmania 2, first had trouble with the CdSearchFile() function, they didn't find the file 100% of the time. Then always failed at the CdReadExec/CdReadSync statements, I just got timeouts. I though it might be that the CdReadExec is trying to overwrite the current code that is executing, but if I quit after the timeout and reexecute the proggy it works fine. I also wondered if the filesystem has to be reset somehow if the disk is changed? Yes I am using original black disks and know that any other type of CD can only be used for audio. I also remembered to set the two strings correctly (indicated by the CdSearchFile sometimes finding the file). Anyone used these functions successfully, or able to point me to some other yarozers site who has? cheers Matt