[futurebasic] Creating resources from scratch

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : May 1998 : Group Archive : Group : All Groups

From: tatewake@... (TJ Grant)
Date: Sat, 30 May 1998 01:16:19 -0500
Hi y'all...

I've got a routine that will read data from the data fork into a handle.
Now what I want to do is to create a new resource file, from scratch, and
place the data fork data from the first file, into, say, restype _"TJTJ",
ID% = 1024, and name it "Terence's Resource".

here's basically what I've been trying(psuedo):
OPEN data fork of "output.rsrc" (my new from scratch file)
CLOSE data fork 'creates the file with 0 data, but it's still there.
fn pGReplaceXRes(mydataforkresourcehandle,_"TJTJ",1024,"Terence's
Resource",RFnum)

But when I open the output file with resedit, it's either, "No Resource
Fork, would you like to create one?" or "This file is corrupted, Error
#-193"

So; can someone give me a nice example of how to move my data from the data
fork of one file(or just my current handle), to a specified resource of the
resource fork of another file?
Again, the output file _MUST_ be made from scratch...

It was so easy just to read from resources and output to data forks, but
the opposite seems so terribly complicated :-P

Thanks for any help...



~ An FB revolution? I am there! ~

-- TJ Grant (tatewake@...)
Inspired Software. http://inspired.netstreet.net/
Macintosh, Dos, Windows, and BeOS software solutions.
Phone: 407-728-7563
....................................
.MacSloMo: 6502 emulation in FB!   .
.http://inspired.netstreet.net/POC/.
....................................