Create an Ini file:
Void Cfrozenbubbleappui :: WriteiniFile (Tuid IInfo, Void * Ptr, Tuint Size) {
Tint R;
RFS FS;
fs.connect ();
CleanupClosepushl (FS);
RDictionaryWritestReam Rdsinifile;
CDICTIONARYSTORE * cdinifile = Application () -> OpenInifilelc (fs); // If you don't exist, create
RDSINIFILE.Assignlc (* cdinifile, IINFO);
TPTR8 BUF ((tuint8 *) PTR, SIZE, SIZE
Trap (r, rdsinifile.writel (buf));
RDSINIFILE.COMMITL ();
Cleanupstack :: PopandDestroy ();
cdinifile-> commitl ();
Cleanupstack :: PopandDestroy (2);
}
Read the Ini file:
TBool Cfrozenbubbleappui :: Readinifile (Tuid IInfo, Void * Ptr, Tuint & size) {
Tint R;
TBOOL RESULT = Efalse;
RFS FS;
fs.connect ();
CleanupClosepushl (FS);
RDictionaryReadstream RdsiniFile;
CDICTIONStore * cdinifile = Application () -> OpenInIfilelc (fs);
IF (cdinifile-> ispresentl (ie info)) {
RDSINIFILE.OPENLC (* cdinifile, IINFO);
TPTR8 BUF ((tuint8 *) PTR, SIZE);
Trap (r, rdsinifile.readl (buf));
Cleanupstack :: PopandDestroy (); // rdsinifile
Result = ETRUE;
}
Cleanupstack :: PopandDestroy (2); // fs, cdinifile
Return Result;
}