More and more users using Foxmail now, but foxmail is not as developing interfaces like Outlook. I think this is very disadvantageous to promote a good software. The younger brother has taken the following studies on the development of Foxmail due to the development of development, and the materials are tied to the materials for a few days. I use Foxmail 4.2 for research, but after Foxmail5.0 is launched, I also test and still use it.
Foxmail's data saves, composed of two files .ind and .box files, Indile main record simple information, and the starting position in the .box file.
address book:
By default, Foxmail's address book consists of two files, address.ind and address.box.
Address.ind file
The file header ranges from 00h-39h, a total of 64 bytes.
05H Save the number of records, 12H-21h Record the address thin name.
The recording portion 40h begins to be the first record, each record length B0H
The 00H of each record is the record number (from 01 start order number), 04h is a delete tag, which indicates that this record is deleted by the user (thereby visible to the information deleted in foxmail is not true)
05H06H Record in. The address in .box is [05H] = 01, [06h] = EA So the detailed information of this record is saved in the address.box file starting in 01fa
09H0AH This record is added to the number of bytes in. Box file plus 156h (record full length record in the box file)
11h is a group record, which indicates that this record is a group record; (I don't have a detailed study of this)
12h is the length of this record name, the maximum is 20h;
13h-32h is the content of this record name
33h is the length of the email address, the maximum is 40h
34H-73H is the email address content
Address.box file
Each record starts by "____________s", then add a car (0A0D)
Then, it is more information, which is composed of the following components (arranged in order)
Emails
MOBILE
Pagernum
OICQ
ICQ
Homepage
SEX
Birthday
FMCOUNTRY
FMPROVINCE
FMCITY
FMPostcode
FMSTREETADDR
Hometel
HOMETEL2
FMFAX
Company
Ofcountry
OfProvince
Ofcity
Postcode
HomeAddress
Ofhomepage
Ofposition
OfDepartment
Offetel
Offetel2
Fax
Construction format: Name colon 0A0D information content 0A0D
The last text is completed to join 2 0A0D
Example 1:
Traverse Address Book Contact Name and Email Information from Foxmail:
Bool Goall (Char * SZFileNameOfind)
Char Headbuf [0x41]; // head BUF
Char Recbuf [0xB1]; // Content BUF
File * pf = fopen (SZFileNameOfind, "RB");
FSeek (PF, 0x40, seek_set); // Go to the project start
While (! Feof))
{
Char name [0x21], email [0x41]; // Define the store name and email characters array
For (i = 0; i <0x21; i )
Name [i] = '/ 0';
For (i = 0; i <0x41; i ) Email [i] = '/ 0';
Fread (RECBUF, 1, 0xB0, PF); // Read a record
IF (RECBUF [0x4] == 1) // Judgment Delete Sign
{
CONTINUE;
}
IF (RECBUF [0x11] == 1) // Judgment group flag
{
CONTINUE;
}
For (i = 0; I { IF (Recbuf [i 0x13] == 0) Break; Name [i] = Recbuf [i 0x13]; } For (i = 0; i { IF (Recbuf [i 0x34] == 0) Break; Email [i] = Recbuf [i 0x34]; } // Add a program that processes the NAME (Recipient Name), Email (Recipient Name), EMAIL Return True; } Example 2: Add a record information to the address book without giving all the code. Get the file header Bool getindfilehead (char * szheadbuf) // Get function of the file header { FSeek (FoxWriter_PF_ADDR, 0x0, Seek_set); Long len = 0; Len = FREAD (Szheadbuf, 1,0x40, foxwriter_pf_addr); IF (len == 0) Return False; Return True; } 2. Modify the number of items; INT itemcount = szheadbuf [0x5]; Itemcount ; Szheadbuf [0x5] = itemcount; 3. Modify the project code SZBUF [0x0] = itemcount; 4. Create a project name SZBUF [0x12] = Strlen (stritemname); For (i = 0; i <0x20; i ) SZBUF [i 0x13] = stritemname [i]; 5. Create a project Email SZBUF [0x33] = Strlen (stremails); For (i = 0; i <0x40; i ) SZBUF [i 0x34] = stretmails [i]; 6. Construct Box files BUF (slightly) 7. Create a project to the Box file pointer Char * pbuf = szbuf; PBUF ; Short * pshbuf = (short *) PBUF; PSHBUF [0x2] = POINT; 8. Create a project word value Long Len = Strlen (SZBoxBuf) LEN = 0x156; 9. Save Ind and Box files (Not finished, will continue to organize research on FOXMAIL Outbox Information Extraction)