naveen said:hi all
I want to create a file(that may be .wav,AIFF,rtf or other) on mac system through programming. How i can do this.
Thanks and regards
naveen said:hi all
I want to create a file(that may be .wav,AIFF,rtf or other) on mac system through programming. How i can do this.
Thanks and regards
naveen said:I want to create these files using c,c++ on macintosh system. how can i save these files. how the resource fork will be handled . Plz help me i am new to mac os.
OK, we getting nearer. So you want to use C or C++ - well you could use either the BSD API's to do your file handling or Carbon. I know next to zero about carbon except that I've seen enough to want to avoid it. The BSD API's are similar but sometimes a necessary evil.naveen said:Hi all
I want to create these files using c,c++ on macintosh system. how can i save these files. how the resource fork will be handled . Plz help me i am new to mac os.
Thanks and regards
weg said:Open a Text editor, write:
#!/usr/bin/sh
echo "My Content" > filename.extension
Ok, just joking..
naveen said:hi all
I am new to Mac Os. I want to create the file using C/C++ programming.
I create the file using following code and the file created but i unable to open this file.This is a .AIFF file.
FILE *fp;
fp = fopen(Audio 1_01,"wb+");
fwrite(DataBuff,SizeToSave,1,fp);
DataBuff buffer contains the raw contents of file.
I have also created the resource fork file using
File fp;
fp = fopen(._Audio 1_01,"wb+");
fwrite(ResourceBuff,SizeToSave,1,fp);
ResourceBuff buffer contains the resource raw data of file.
When i open the created file using the hex editor then I see File Type/Creator
is empty.
But i don't know how to deal with this resource fork file creation. How the created resource fork file linked to its data fork file.
When i open the created file using the hex editor then I see File Type/Creator
is empty.
If any body have idea then plz help me.
Thanx in advance
naveen said:hi all
I want to create a file(that may be .wav,AIFF,rtf or other) on mac system through programming. How i can do this.
Thanks and regards
naveen said:As I earlier told that i am a new programmer on mac. I have knowledge of Mac(HFS and HFS+) file system. I have written a small programe in my pc(using visual c++) to recover files of a crashed mac HDD is connected to pc then my program is able to recover both data fork and resource fork. If we transfer both data fork and rosource fork of a file to mac machine the file run perfectly.
Now i am writing the same program on mac machine. I know the location of both data fork and resource fork . But my problem is how to associate them with each other. I have already discuss how i am writting both the files(data fork and resource fork).
if any body have some idea then plz help me
Thanks and regards