home *** CD-ROM | disk | FTP | other *** search
/ CICA 1992 November / CICA_MS_Windows_CD-ROM_Walnut_Creek_November_1992.iso / win3 / misc / cardfile / cardfile.fmt
Internet Message Format  |  1990-11-08  |  3KB

  1. From comp.windows.ms Sun Oct 14 13:02:59 1990
  2. From: Renee@cup.portal.com (Renee Linda Roberts)
  3. Date: 10 Oct 90 16:19:50 GMT
  4. Newsgroups: comp.windows.ms
  5. Subject: For those who want it...
  6.  
  7. I got this from the Microsoft Roundtable on GEnie yesterday. Thought it
  8. might be useful for others as well.
  9.            -------------------------------------------
  10.                    Microsoft Applications Note
  11.                         Cardfile File Format
  12.  
  13. The Cardfile file format is as follows:
  14.  
  15. Byte #    Description
  16.  
  17. 0 - 2    "Signature bytes --- always ""MGC"" (4D 47 43) "    
  18. 3 - 4    Number of cards in file 
  19.                          
  20. Beyond the first five bytes are the index lines --- the
  21. information about the top line of each"card.  The first
  22. index entry begins at byte #5 in the file, and successive
  23. entries begin 34 bytes after the beginning of the last index
  24. entry (the second entry at byte #39, the third entry at byte
  25. #6D, etc.).  The format for each index line entry is as
  26. follows: 
  27.  
  28. 0 - 5    Null bytes, reserved for future use (should all be 00)
  29. 6 - 9    Absolute position of card data in file     
  30. A        Flag byte (00) 
  31. B - 32    Index line text 
  32. 33        Null byte ; indicates end of index entry 
  33.  
  34. After the last index entry, each card's data is stored. 
  35. Card data will be in one of four general formats: graphic
  36. and text, text only, graphic only, and blank.  Blank cards
  37. consist of four null bytes; the other card formats are
  38. below:
  39.                          
  40. Graphic    Text        Graphic 
  41. & Text    Only        Only 
  42. 0 - 1     0 - 1#    0 - 1    Length of graphic bitmap. #
  43. 2 - 3        *        2 - 3    Width of graphic.  *
  44. 4 - 5       *        4 - 5    Height of graphic.  *
  45. 6 - 7       *        6 - 7    X-coordinate of graphic.  *
  46. 8 - 9       *        8 - 9    Y-coordinate of graphic.  *
  47. A - x       *        A - x    Bitmap of graphic.  *    
  48. x+1 - x+2     2 - 3    x+1 - x+2#Length of text entry.  #    
  49. x+3 - y        4 - z    *    Text.  *    
  50.                          
  51. x = 9 + length of bitmap 
  52. # - Bytes are null if no bitmap/text
  53. y = x + 2 + length of text entry     
  54. * - Bytes don't exist if no bitmap/text    
  55. z = 3 + length of text entry     
  56.                          
  57. The first byte of any card's data entry is pointed to by
  58. bytes 6-9 in the index entry.  Note that no null byte is
  59. used to indicate the end of the card's data entry; the next
  60. card's data entry immediately follows the last byte of the
  61. previous entry, which will be null only if the previous card
  62. has no text (null length of text entry).
  63.              
  64. All numbers in this document, including those in the
  65. descriptive text, should be interpreted as hexadecimal
  66. numerals.  All data pointers and count bytes in the file are
  67. unsigned binary/hexadecimal integers in least- to most
  68. significant format.  All text in the file is saved in low
  69. ASCII format.  In the text section of a card's data, <CR> is
  70. always followed by <LF>.
  71.  
  72. ----------------- End of Note -----------------
  73.  
  74.