DBF Files

From PeformIQ Upgrade
Revision as of 09:43, 7 February 2015 by PeterHarding (talk | contribs)
Jump to navigation Jump to search

DBF File Links

FPT File Links


Code

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
privatestruct DBTHeader
 {
    publicInt32 nextBlockID;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]
    public byte[] reserved1;
    [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 8)]
    public string fileName;
    public byte version; // 0x03 = Version III, 0x00 = Version IV
    [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
    public byte[] reserved3;
    publicInt16 blockLength;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst = 490)]
    public byte[] reserved4;
}

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
privatestruct MemoHeader
{
    [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)]
    public byte[] reserved;
    publicInt16 startPosition;
    publicInt32 fieldLength;
}


You may also view the DBT/FPT file in hexadecimal format in VFP:

 DO HOME()+'\tools\hexedit\hexedit.app' WITH 'YourFile.FPT'

Tools