Forum > General
Creating a file type....
(1/1)
captian jaster:
I want to create my own file type(So say a document type..)
I under stand that files work off of headers but is it said in a packed record(Mind you I have only used packed arrays before)
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---MyDoc = Packed Record Something:Pointer; Body:String; B:Boolean;End; Or is just done has a record %)
Not sure what im doing now :-[
theo:
Use a TFileStream:
http://lazarus-ccr.sourceforge.net/docs/rtl/classes/tfilestream.html
http://lazarus-ccr.sourceforge.net/docs/rtl/classes/tstream.html
and write your data using:
FS.WriteBufffer(Buffer,Count);
or
FS.WriteAnsiString(S);
or
FS.WriteByte(B);
etc..
captian jaster:
Cool, Ill try that
Navigation
[0] Message Index