Function : Canonical Format Conversion

ODSReadMemory - Convert a structure from canonical format to machine-specific format.
----------------------------------------------------------------------------------------------------------

#include <ods.h>

void LNPUBLIC ODSReadMemory(
void far *ppSrc,
WORD type,
void far *pDest,
WORD iterations);

Description :

This function converts Domino data structures from Domino canonical format to machine-specific (host) format. This writes the result into a variable or memory buffer provided by the caller.

You must convert data structures to host format before accessing the members of the structure if (1) your API program runs on non-Intel architecture machines, and (2) your API program is reading a Domino data item of one of the data types listed below:

TYPE_COMPOSITE
TYPE_COLLATION
TYPE_OBJECT
TYPE_VIEW_FORMAT
TYPE_ICON
TYPE_SIGNATURE
TYPE_SEAL
TYPE_SEALDATA
TYPE_SEAL_LIST
TYPE_WORKSHEET_DATA
TYPE_USERDATA
Parameters :

Sample Usage :


   void           *pItemValue;
   CDFONTTABLE     cdFontTab;
   CDFACE          cdFace;
   WORD            wIndex;

  /* RecordPtr points to the first byte of the item value after the
     datatype word. The item value is in Domino canonical format. It
     starts with a CDFONTTABLE structure. Call ODSReadMemory() to
     convert this CDFONTTABLE to host format and store it in
     cdFontTab. ODSReadMemory() increments pItemValue to point to
     the next byte in the input buffer after the CDFONTTABLE.
   */

   pItemValue = RecordPtr;
   ODSReadMemory( &pItemValue, _CDFONTTABLE, &cdFontTab, 1 );

   for (wIndex = 0; wIndex < cdFontTab.Fonts; wIndex++)
   {
       ODSReadMemory( &pItemValue, _CDFACE, &cdFace, 1 );
       printf( "    Font %d:\n", wIndex );
       printf( "       Face    = %d\n", cdFace.Face );
       printf( "       Family  = %d\n", cdFace.Family );
       printf( "       Name    = %s\n", cdFace.Name );
   }


See Sample Program :

See Also :

NSFItemAppend
----------------------------------------------------------------------------------------------------------