>Hi

>I need to know the users.dat file format and memopad.dat file format. Where
can i find the >details on these, please help.

>Bye
>Bhaski

Hi Bhaski,

I have the structures with me. But I have not tried them. Please check them
out.
Hope this helps.

Thanks
Sreenivas Reddy
Developers' Nation DTS Engineer
Developers' Nation provides Palm OS Technical Support with a guaranteed
response time.  Go to www.devnation.net
Developers' Nation is the fastest, most reliable and affordable way to
resolve your technical issues.

Palm Desktop Software USERS.DAT File Structure
  a.. These formats apply to the Windows version of the Palm Desktop
software.
  b.. The information presented here may or may not be accurate, the author
makes no representation as to the accuracy of any information supplied.
  c.. Palm does not recommend that you program to the structure of the
desktop data files. They have publicly stated that these files are subject
to change at any time. Use this information at your own risk!
  d.. Warning: This file format was developed by studying the actual
contents of users.dat and making educated guesses regarding the structure
and meaning of the contents. Although the author experimented with various
conduit settings and user counts, it is highly probable that this format is
incomplete and may contain errors.

Users.Dat
      Field Name Type Size Comments
      User Count Short 2*Byte The count of users
      Class Flag Short 2*Byte 0xFFFF value to indicate a class entry follows
      Class entry Class-Entry   CUser class name
      User entry User-Entry   occurs user count number of times


User-Entry
      Field Name Type Size Comments
      Hotsync ID Long 4*Byte Unique hotsync id for this user. Values less
than 256 are reserved and indicate a user profile record
      NLength Char 1*Byte Length of user Long Name
      Long Name Char String User Long Name of NLength
      Dlength Char 1*Byte Length of user directory name
      Dir Name Char String User directory name of DLength
      Active Short 2*Byte value 0x0001 indicates an active user that has
hotsynced with this PC before.
      PWLength Short 2*Byte Length of user password, if any.
      Unknown Short 2*Byte Unknown purpose. If you discover its purpose,
please let me know.
      Password Char String A 32 character encoded string that represents the
user password.
      Important: This field is present only if the PWLength is non-zero.
      Unknown Short 2*Byte Unknown purpose. If you discover its purpose,
please let me know.
      Variable Data Flag Short 2*Byte 0xFFFF value to indicate a class entry
follows. If one does, it will be immediately followed by Conduit Entries for
the Permanent Sync settings.
      0x8001 value to indicate no more data for this user.
      0x8003 value to indicate Conduit Entries follow for this users
Temporary Sync settings.
      Note: Any other value is an unknown value, you should continue to read
shorts from the record until you encounter one of the above values or EOF to
indicate the end of record for this user.
      Variable-Data Variable-Data   See Variable Data Flag field for an
explanation.


Class-Entry
      Field Name Type Size Comments
      Constant Short 2*Byte Constant 1
      Length Short 2*Byte Length of Class Name
      Class Name Char Byte Class name of length specified.


Variable-Data
      Field Name Type Size Comments
      Class entry Class-Entry   CUserSyncPreference class name Present only
if Variable Flag is 0xFFFF. Note that when this field is present, it will
always be immediately followed by Conduit-Entries representing the Permanent
Sync Settings for this machine.
      Conduit entry Conduit-Entry   Conduit Settings, occurs a variable
number of times.


Conduit-Entry
      Field Name Type Size Comments
      Creator ID Char 4*Byte The reversed 4 byte creator ID associated with
the conduit.
      Note: I have observed entries here with non-character values like
0x00000001 and 0x00000002. These may represent custom settings associated
with certain conduits, but I am not sure.
      Settings Char ByteArray Conduit Settings, occurs a variable number of
times (perhaps related to the number of users). The byte array terminates
with a 0x80 byte. The byte prior to the terminating byte indicates whether
or not more entries follow (0x01 = no more entries, 0x03 = more entries).
      The ByteArray may represent the individual user settings for this
conduit, where user 0 in the users.dat file is index 0 in the ByteArray and
the value is the setting for the conduit, e.g.,
      0x00 = Synchronize
      0x01 = Overwrite PC to Handheld
      0x02 = Overwrite Handheld to PC
      0x03 = Do Nothing
      0x04 = Custom


Palm Desktop Software MEMOPAD.DAT File Structure
  a.. These formats apply to the Windows version of the Palm Desktop
software.
  b.. The information presented here may or may not be accurate, the author
makes no representation as to the accuracy of any information supplied.
  c.. Palm does not recommend that you program to the structure of the
desktop data files. They have publicly stated that these files are subject
to change at any time. Use this information at your own risk!
      Field Name Type Size Comments
      Version Tag Char 4*Byte 0x00 0x01 0x50 0x4D (MP10) for Memopad.
      File Name CString   Fully Qualified Filename of file on PC
      Table String CString   Custom show header
      Next Free Long 4*Byte Next Free Category ID
      Category Count Long 4*Byte Count - 1 of the number of category entries
(does not include Unfiled category)
      Category entries Category-Entry   Occurs category count times
      Resource ID Long 4*Byte Schema Resource ID
      Fields per Row Long 4*Byte Schema Fields per row. Will be 6 for
Memopad
      Rec ID Pos Long 4*Byte Schema Record ID Position (index to field table
entry that contains record id)
      Rec Status Pos Long 4*Byte Schema Record Status Position (index to
field table entry that contains record status)
      Placement Pos Long 4*Byte Schema Placement Position (index to field
table entry that contains record placement position)
      Field Count Short 2*Byte Schema Field Count (number of fields in
schema) Corrected April 19, 2000
      Field Entry Short 2*Byte Schema field entry occurs field count times.
For Memopad the entries will be 1,1,1,5,6,1 Corrected April 19, 2000
      Num Entries Long 4*Byte Record count * 6 (number of field entries in
entirefile, as noted, divide by 6 to arrive at actual record count)
      Memopad entry Memopad-Entry   Occurs with record count



Category-Entry
      Field Name Type Size Comments
      Index Long 4*Byte Category Index
      ID Long 4*Byte Category ID
      Dirty Flag Long 4*Byte Category Dirty Flag
      Long Name Cstring   Long Category Name
      Short Name Cstring   Short Category Name


Memopad-Entry
      Field Name Type Size Comments
      Field Type Long 4*Byte value 1 Integer
      Record ID Long 4*Byte
      Field Type Long 4*Byte value 1 Integer
      Status Field Long 4*Byte Bitwise Record Status: Pending = 0x08, Add =
0x01, Update = 0x02, Delete = 0x04, Archive = 0x80
      Field Type Long 4*Byte value 1 Integer
      Position Long 4*Byte
      Field Type Long 4*Byte value 5 Cstring
      Padding Long 4*Byte Always 0x0000
      Memo Text Cstring  Memo text
      Field Type Long 4*Byte value 6 Boolean
      Private Long 4*Byte 1 = True
      Field Type Long 4*Byte value 1 Integer
      Category Long 4*Byte



Cstrings
Cstrings are stored as follows:

  1.. Strings less than 255 bytes are stored with the length specified in
the first byte followed by the actual string.
  2.. Zero length strings are stored with a 0x00 byte.
  3.. Strings 255 bytes or longer are stored with a flag byte set to 0xFF
followed by a short (2*Byte) that specifies the length of the string,
followed by the actual string.

Field Types
The schema mechanism uses field types to identify the data. The meanings of
the field types are in the table below. Number Meaning
      0 None
      1 Integer
      2 Float
      3 Date
      4 Alpha
      5 Cstring
      6 Boolean
      7 Bitflag
      8 RepeatEvent








-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to