home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / pc / opus / opin103d.lzh / D_MSG2.PAS < prev    next >
Pascal/Delphi Source File  |  1989-12-03  |  3KB  |  75 lines

  1. Program DemoMessage;
  2.  
  3.   {***************************************************************************}
  4.   {*                                                                         *}
  5.   {* O p u s   I n t e r f a c e    V e r   1.03     Demo Program.           *}
  6.   {*                                                                         *}
  7.   {*   Opus V 1.0x Interface for Turbo Pascal Ver 4.0, 5.0 and 5.5           *}
  8.   {*                                                                         *}
  9.   {*  These Structures,Procedures and Functions may help you to make OPUS    *}
  10.   {* utilities for to help other SysOps, Please read the Documentation.      *}
  11.   {*                                                                         *}
  12.   {*  Regards                                                                *}
  13.   {*    Per Holm                                                             *}
  14.   {*                                                                         *}
  15.   {*   FIDO: Per Holm - Asgaard BBS 2:230/22.0                               *}
  16.   {*   UUCP: perholm@daimi.DK                                                *}
  17.   {*                                                                         *}
  18.   {***************************************************************************}
  19.  
  20.   {***************************************************************************}
  21.   {*                                                                         *}
  22.   {*  Demo of the message related routines...                                *}
  23.   {*                                                                         *}
  24.   {***************************************************************************}
  25.  
  26. Uses
  27.   Dos,OPINT;
  28.  
  29. VAR
  30.   Buffer: ARRAY[1..32000] OF Char;
  31.   Msg: _MsgRaw;
  32.  
  33. PROCEDURE Error;
  34.  
  35.   VAR
  36.     Err: Integer;
  37.  
  38.   BEGIN
  39.     Err:=OpIntERROR;
  40.     IF Err>0 THEN
  41.       BEGIN
  42.         Writeln('You Got Yourself an Error ',Err,' During OpInt Access');
  43.         Readln;
  44.       END;
  45.   END;
  46.  
  47. PROCEDURE Messages;
  48.  
  49.   Var
  50.     i: Integer;
  51.  
  52.   BEGIN
  53.     Msg.Counter:=32000;            { Max Size of Buffer }
  54.     Msg.Body:=@Buffer;             { Buffer Pointer }
  55.     ReadMsgNew('1.MSG',Msg);
  56.     Error;
  57.     writeln('Lets write back');
  58.     WriteMsgNew('2.msg',Msg);
  59.     Error;
  60.     WITH MSG DO
  61.       BEGIN
  62.         writeln('From .........: ',_From);
  63.         writeln('To ...........: ',_to);
  64.         writeln('Subject ......: ',_subj);
  65.         writeln('Date .........: ',_date);
  66.         writeln('Time .........: ',_Times);
  67.         writeln(_Dest,' ',_orig,' ',_cost);
  68.       END;
  69.   END;
  70.  
  71. BEGIN
  72.   Messages;
  73.   readln;
  74. END.
  75.