home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / bpos2i.zip / MSG.PAS < prev    next >
Pascal/Delphi Source File  |  1994-05-31  |  4KB  |  93 lines

  1. (* ====================================================== *)
  2. (*                         MSG.PAS                        *)
  3. (*     Implementation of the functions of MSG.DLL         *)
  4. (*        Translated to Pascal by wr/toolbox mag          *)
  5. (* ====================================================== *)
  6. {$IFNDEF OS2}
  7.   Error: Wrong target/Compiler not patched
  8. {$ENDIF}
  9.  
  10. UNIT Msg;
  11.  
  12. INTERFACE
  13.  
  14. USES
  15.   Os2Def;
  16.  
  17. (* Get a message from a message file and incorporate variable information *)
  18. {
  19. FUNCTION DosGetMessage (DOSGETMESSAGE) (
  20.     IvTable             : Pointer;      (* array of pointers to strings *)
  21.     IvCount             : WORD;     (* number of strings in above *)
  22.     DataArea            : pChar;       (* address of buffer to get output *)
  23.     DataLength          : WORD;     (* size of above buffer *)
  24.     MsgNumber           : WORD;     (* the number of the message *)
  25.     FileName            : pChar;       (* path name of message file *)
  26.     VAR MsgLength       : WORD)     (* returned length of message *)
  27.     : WORD;
  28. }
  29.  
  30. FUNCTION DosInsMessage(
  31.     IvTable             : Pointer;      (* array of pointers to strings *)
  32.     IvCount             : WORD;     (* number of strings in above *)
  33.     MsgInput            : pChar;       (* address of the message *)
  34.     MsgInLength         : WORD;     (* length of input message *)
  35.     DataArea            : pChar;       (* address of buffer to get output *)
  36.     DataLength          : WORD;     (* size of above buffer *)
  37.     VAR MsgLength       : WORD      (* returned length of message *)
  38.     ) : WORD;
  39.  
  40. FUNCTION DosPutMessage(
  41.     FileHandle          : WORD;     (* handle to write to *)
  42.     MessageLength       : WORD;     (* length of message *)
  43.     MessageBuffer       : Pointer       (* address of message buffer *)
  44.     ) : WORD;
  45. FUNCTION Dos16InsMessage(
  46.     IvTable             : Pointer;      (* array of pointers to strings *)
  47.     IvCount             : WORD;     (* number of strings in above *)
  48.     MsgInput            : pChar;       (* address of the message *)
  49.     MsgInLength         : WORD;     (* length of input message *)
  50.     DataArea            : pChar;       (* address of buffer to get output *)
  51.     DataLength          : WORD;     (* size of above buffer *)
  52.     VAR MsgLength       : WORD      (* returned length of message *)
  53.     ) : WORD;
  54.  
  55. FUNCTION Dos16PutMessage(
  56.     FileHandle          : WORD;     (* handle to write to *)
  57.     MessageLength       : WORD;     (* length of message *)
  58.     MessageBuffer       : Pointer       (* address of message buffer *)
  59.     ) : WORD;
  60.  
  61. IMPLEMENTATION
  62.  
  63.   FUNCTION DosPutMessage;     EXTERNAL 'Msg'      INDEX   1;
  64.   FUNCTION Dos16PutMessage;   EXTERNAL 'Msg'      INDEX   1;
  65. {
  66.   FUNCTION DosTrueGetMessage; External 'Msg'      INDEX   2;
  67. }
  68.   FUNCTION DosInsMessage;     EXTERNAL 'Msg'      INDEX   3;
  69.  
  70.   FUNCTION Dos16InsMessage;   EXTERNAL 'Msg'      INDEX   3;
  71.  
  72. (* ====================================================== *)
  73. (*                         32 Bit                         *)
  74. {
  75.   FUNCTION Dos32InsertMessage(* ------------- *);
  76.     External 'Msg'      INDEX   4;
  77.  
  78.   FUNCTION Dos32PutMessage(* ------------- *);
  79.     External 'Msg'      INDEX   5;
  80.  
  81.   FUNCTION Dos32TrueGetMessage(* ------------- *);
  82.     External 'Msg'      INDEX   6;
  83.  
  84.   FUNCTION DosIQueryMessageCP(* ------------- *);
  85.     External 'Msg'      INDEX   7;
  86.  
  87.   FUNCTION Dos32IQueryMessageCP(* ------------- *);
  88.     External 'Msg'      INDEX   8;
  89. }
  90. END.
  91.  
  92. (* ====================================================== *)
  93.