SIG_CD_xxx - Signatures for Composite Records in items of type TYPE_COMPOSITE. ----------------------------------------------------------------------------------------------------------
These values identify the type of a composite data (CD) record. For example, a CD record identified by SIG_CD_PARAGRAPH contains a data structure of type CDPARAGRAPH.
An item of TYPE_COMPOSITE consists of a series of CD records. Each CD record begins with a header. The signature is treated as a WORD value; it consists of two byte fields. The low-order byte contains the actual signature value, and is a value from the SIG_CD_xxx, SIG_QUERY_xxx, or SIG_ACTION_xxx sets. The high-order byte is one of the following:
1) 0x00: Inidicates that the signature word is followed by a DWORD (32-bit) length. The header may be accessed using the LSIG structure.
2) 0xFF: Indicates that the signature word is followed by a WORD (16-bit) length. The header may be accessed using the WSIG structure.
3) 0x01-0xFE: The high-order byte contains an 8-bit length. The header may be accessed using the BSIG structure.
The length specified in the header of a CD record includes the length of the header itself.
Note: CD record headers must be word aligned (CD records always begin on even byte boundaries). This guarantees that distinct signature bytes always align on word boundaries.
API programs normally use the routine EnumCompositeBuffer() to parse the CD records in an item of TYPE_COMPOSITE.
Sample Usage :
//************************************************************************
//
//
// CDParse
//
// called by EnumCompositeBuffer to dump contents of each chunk
// of a compound document (Rich text) item
//
// Inputs:
// char *RecordPtr - pointer to start of data
// WORD RecordType - type of CD chunk
// DWORD RecordLength - length of returned chunk
// void far *Unused
//
//************************************************************************
STATUS LNPUBLIC CDParse(
char *RecordPtr, WORD RecordType, DWORD RecordLength, void * Unused)
{
fprintf( dumpfile," CD RECORD. Size = %ld bytes.\n",RecordLength);
fprintf( dumpfile," Record Type =\n");
switch (RecordType) {
case SIG_CD_PARAGRAPH:
fprintf( dumpfile," PARAGRAPH\n");
break;
case SIG_CD_PABDEFINITION:
fprintf( dumpfile," PABDEFINITION\n");
break;
case SIG_CD_PABREFERENCE:
fprintf( dumpfile," PABREFERENCE\n");
break;
case SIG_CD_TEXT:
fprintf( dumpfile," TEXT");
break;
case SIG_CD_LINKEXPORT2:
fprintf( dumpfile," LINKEXPORT2\n");
break;
case SIG_CD_HEADER:
fprintf( dumpfile," HEADER\n");
break;
case SIG_CD_FONTTABLE:
fprintf( dumpfile," FONTTABLE\n");
break;
default:
fprintf( dumpfile,"Unidentified CD Record.\n");
break;
}
return NOERROR;
}