TIP: Click on subject to list as thread! ANSI
echo: delphi
to: THAMIR AL-GHASLAN
from: DAVID ALGER
date: 1996-10-04 23:45:00
subject: QWK 01/07

TA> any one knows if its possible to read a qwk file from delphi? i have the
TA> layout of the file, and have been trying everything to read its linear
TA> storage media. i am half way there with the arrays and streams examples
TA> found in delphi developers guide, but i have a long way to go.
 
 
Sure is, heres how to write a qwk file, shouldn't be hard to make it into a 
read routine. Its written for TP in OOP, but should be able to be converted 
to Delphi a little bit easier or used as is.
 
unit mmqwk;
 
interface
{$O+}
 
uses mmabs,msgapi,msgstr,strings,doorl;
{mmabs - Generic Abs Object - Can be created or Not used}
{msgapi - NetMail routines may need this one}
{msgstr - Some generic string handling}
{strings - TP unit to deal with nul terminating}
{doorl - Low Level Door routines for a QWK door- can be deleted out}
 
type
     bsingle = array [0..3] of byte;
const
     copyright ='Copyright 1996 MultiMail';
type
   qwk_layout = record
   status : char;
   number : array[1..7] of char;
   dated   : array[1..8] of char;
   timed   : array[1..5] of char;
   towho  : array[1..25] of char;
   fromwho: array[1..25] of char;
   subject: array[1..25] of char;
   password: array[1..12] of char;
   reference: array[1..8] of char;
   blocks  : array[1..6] of char;
   flag    : char;
   conference : word;
   logical    : word;
   network    : char;
end;
type
  indexes = record
   rec_num : bsingle;
   conf    : byte;
end;
type
   qwk_controltext = record
   bbsname  : string;
   city     : string;
   phone    : string;
   sysop    : string;
   reg_num  : string;
   packet   : string[8];
   datetime : string; {MM-DD-YYYY,HH:MM:SS}
   username : string;
   alias    : string;{QWKE ONLY}
   zero     : word;
   messages : longint;
   conferences: longint; {-1}
   number   : longint;
   conf     : string;
   qwktext  : text;
end;
 
type
   qwk_conf = object(conference_object)
    qwkinfo  : qwk_controltext;
    qwktxt   : text;
   constructor init;
   destructor done; virtual;
   procedure setconf ( n : string); virtual;
   procedure setnum  ( l : longint);virtual;
   procedure writeconf;virtual;
   procedure closeconf;virtual;
end;
 
type
   qwk_mail = object(mail_object)
   qwkinfo : ^qwk_layout;
   qwkfile : file;
   conf    : longint;
   constructor init;
   destructor done; virtual;

Continued in the next message...
--- TriToss (tm) Professional 10.0 - #132
---------------
* Origin: City Scape BBS * 413-568-5241 * ProSoft Productions (1:321/200.0)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.