Path: chuka.playstation.co.uk!news From: "Ghost Technical Support" Newsgroups: scee.yaroze.programming.libraries Subject: Re: Read from CD Date: Wed, 14 Jul 1999 11:03:24 +1200 Organization: PlayStation Net Yaroze (SCEE) Lines: 44 Message-ID: <7mggih$t1v9@chuka.playstation.co.uk> References: <35E55F0A.616FB8A7@cww.de> NNTP-Posting-Host: 203.98.13.67 X-Newsreader: Microsoft Outlook Express 4.72.3110.5 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 brainchild@cww.de wrote in message <35E55F0A.616FB8A7@cww.de>... >Hi... > >who can tell me why the following little program doesn´t work ???? >I only get a strange error like this... > >CD_cw:(CdlSetloc) Sync=NoIntr, Ready=NoIntr > >(I use Codeworrier V 2.0.3) > >Are there other methods to read files from CD ??? > >cYa >Jo... > > >#include > >u_long sectbuf[1024]; >u_long Len; > >main() >{ > > Len = CdReadFile("\DATA\TEXTURE\FANCY\CHECK01.TIM", sectbuf, 0); > printf("Bytes:%d\n",Len); > >} You need either double slashes, or alternatively use the / character instead (a lot of c compilers turn this into \\ for you). You also need the ;1 at the end (to specify the version of the file) And you have to wait for the operation to finish, its a asyncronous operation, it doesn't wait till its finished before returning. ..Chuck..