home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / vp21beta.zip / OEXMPSRC.RAR / EA / OS2EA.TXT < prev    next >
Text File  |  2000-08-15  |  4KB  |  102 lines

  1.  
  2.    Virtual Pascal for OS/2 v1.01
  3.    Extended Attributes example class BETA
  4.    (C) 1996 fPrint UK Ltd
  5.  
  6. Introduction
  7. ~~~~~~~~~~~~
  8.   This archive contains a sample class for Virtual Pascal for OS/2 to
  9.   ease accessing OS/2 Extended Attributes.
  10.   The aim of this class is to help you produce OS/2 applications with
  11.   Virtual Pascal for OS/2 that utilise the power of OS/2's Extended
  12.   Attributes without any large overhead in terms of finding out
  13.   which API calls are required.
  14.  
  15.   To use this class, you need Virtual Pascal v1.01 Beta 2 or later.
  16.  
  17. What it does
  18. ~~~~~~~~~~~~
  19.   This class encapsulates most of the basics of accessing and modifying
  20.   a list of EA's associated with a file in OS/2.
  21.  
  22.   As demonstrated in the sample app, TestEA, getting a list of EAs for
  23.   a file, displaying the list and modifying it, is very easy.
  24.   setting up a basic DIVE
  25.  
  26.   The first step is to call the tEAList Create constructor, which takes
  27.   a file name as the parameter.  The file must exist, or the call will
  28.   raise an EEAError.  When the constructor returns, it contains a
  29.   collection of extended attributes associated with the file.
  30.  
  31.   The Items array is used to access individual EA items; the Count
  32.   property tells how many EA's are currently in the list.
  33.  
  34.   To add a new EA to the list, call the relevant Add* method; there are
  35.   methods for adding general EA's and EA's of String type.  Each add
  36.   method exists in several flavours that allow you to pass either pChars
  37.   or Pascal Strings as any parameter.
  38.  
  39.   To remove an EA, either call RemoveEA with a specific Item as the
  40.   parameter, or call RemoveNamedEA to remove an EA with a specific name,
  41.  
  42.   To search for an EA with a given name, use the SearchFor function,
  43.   which takes the name of an EA as an argument, and returns a tEA object.
  44.  
  45.   When you have finished modifying the list of EA's, call the WriteToFile
  46.   method to write the changes back to disk.
  47.  
  48.   In any case, after finishing using the class, free the memory used by
  49.   calling the Destroy destructor.
  50.  
  51. The EA items
  52. ~~~~~~~~~~~~
  53.   Each EA item can provide information about itself; some of this
  54.   information can also be modified.  All EA's can return the following
  55.   information:
  56.  
  57.     EANameZ: pChar                     // Name of EA data, pChar
  58.     EAName: String                     // Name of EA data, String
  59.     EAData: Pointer                    // Pointer to raw EA data
  60.     EALength: SmallWord                // Length of raw EA data
  61.     EAType: SmallWord                  // EA Type
  62.     GetString: String;                 // EA string representation
  63.  
  64.   In addition, EA's of type String provide more options.  These EA's
  65.   have got a StringValue property, which can be modified to give the
  66.   EA a new value.  To modify the value of other types of EA's, you need
  67.   to expand the base EA class framework in the same manner as has been
  68.   done for the tEA_Ascii class.
  69.  
  70.   For more information on how to use the tEAList, tEA and tEA_Ascii
  71.   classes, please refer to the source code in Os2EA.Pas and TestEA.Pas.
  72.  
  73. Contact Address
  74. ~~~~~~~~~~~~~~~
  75.   Bug reports or feature requests should be directed to one of the
  76.   following addresses:
  77.  
  78.   fPrint UK Ltd
  79.   Cambridge House
  80.   Hammersmith
  81.   London W6 0LE
  82.   United Kingdom
  83.   Att: Allan Mertner
  84.  
  85.   Tel. +44 (181) 563 2359
  86.   Fax. +44 (181) 563 2361
  87.   BBS  +44 (181) 563 8624
  88.  
  89.   Internet:    vpascal@ibm.net
  90.   CompuServe:  102212,3041
  91.   FidoNet:     2:254/283
  92.   WWW:         http://www.fprint.co.uk/vpascal
  93.   CompuServe:  GO FPRINT
  94.                or select OS/2 Vendor Forum B (GO OS2BVEN) Section 6.
  95.  
  96. Trademarks
  97. ~~~~~~~~~~
  98.   Company names, brand names and product names are trademarks or
  99.   registered trademarks of their respective holders.
  100.  
  101.  
  102.