Skip Headers
Oracle® Outside In Content Access Developer's Guide
Release 8.3.7

Part Number E12846-02
Go to Documentation Home
Go to Table of Contents
Go to Index
Go to Feedback page
Contact Us

Go to previous page
Go to next page
View PDF

6 Content Access Functions

The Content Access module is required to use these functions.

6.1 CAOpenContent

CAOpenContent is used to initiate content access for a file that has been opened by DAOpenDocument.


DAERR CAOpenContent(
   VTHDOC         hDoc;
   VTLPHCONTENT   phContent;

phContent is not a file handle.


Return Values

6.2 CACloseContent

CACloseContent is called to terminate content access for a file.


DAERR CACloseContent(
   VTHCONTENT   hContent;


Return Values

6.3 CAReadFirst

This function is called to set the read pointer to the beginning of the document content and to obtain the file identification property for the document.


DAERR CAReadFirst(
   VTHCONTENT         hContent;


Return Values

6.4 CAReadNext

CAReadNext is called to retrieve text and properties from a file, beginning at the location where the last content was provided.


   VTHCONTENT         hContent;


Return Values


typedef struct SCCCAGETCONTENTtag
   VTDWORD         dwStructSize;
   VTDWORD         dwFlags;
   VTDWORD         dwMaxBufSize;
   VTVOID       *  pDataBuf;
   VTDWORD         dwType;
   VTDWORD         dwSubType;
   VTDWORD         dwData1;
   VTDWORD         dwData2;
   VTDWORD         dwData3;
   VTDWORD         dwData4;
   VTDWORD         dwDataBufSize;

Each piece of content has a type and a subtype. Based on the type and subtype, the content is described by using up to four VTDWORDs and a data buffer provided by the caller. The dwStructSize, dwFlags, pDataBuf and dwMaxBufSize elements of this structure should be filled by the caller before calling CAReadNext or CAReadFirst.

  • dwStructSize: Initialized by caller to sizeof(SCCCAGETCONTENT).

  • dwFlags: Set by caller. Currently undefined, must be set to 0.

  • dwMaxBufSize: Initialized by caller to the size of the buffer pointed to by pDataBuf.

  • pDataBuf: This pointer must be set by the caller to a buffer at least 1K in size and must be properly byte-aligned (4 bytes). This buffer will be filled with content information based on dwType.

  • dwType: Returns one of the following values (For detailed descriptions of the content types, see Chapter 7, "Content Description"):

    • SCCCA_ANNOTATION: Marks the location of an annotation or sub-document.

    • SCCCA_BEGINTAG: Marks the beginning of a tagged section of the document

    • SCCCA_BREAK: Signals the end of document properties

    • SCCCA_ENDTAG: Marks the end of a tagged section of the document

    • SCCCA_FILEPROPERTY: File identification information

    • SCCCA_GENERATED: Text generated from non-character data

    • SCCCA_OBJECT: Embedded object information

    • SCCCA_SHEET: The name of a sheet in a spreadsheet or presentation

    • SCCCA_STYLECHANGE: Indicates a change in style information

    • SCCCA_TEXT: Normal stream text

    • SCCCA_TREENODELOCATOR: Used by DAOpenRandomTreeRecord and DASaveRandomTreeRecord.

  • dwSubType Returns additional information based on dwType. Here are some valid subtypes:

    • SCCCA_ANNOTATION: Subtype are values like SCCCA_ANNOTATION_FOOTNOTE or SCCCA_ANNOTATION_ENDNOTE. dwData1 links to the corresponding SCCCA_BEGINTAG.

    • SCCCA_HIDDEN: A valid subtype for the SCCCA_TEXT type representing hidden text.

    • SCCCA_FRAME_EX: A valid subtype for the SCCCA_BEGINTAG and SCCCA_ENDTAG types representing extended frames.

    • SCCCA_LINKEDOBJECT: A valid subtype for the SCCCA_BEGINTAG and SCCCA_ENDTAG types representing an object accessible via a link. When dwSubType equals SCCCA_LINKEDOBJECT, dwData1, dwData2, dwData3 and dwData4 will contain values that are used to locate the object.

    • SCCCA_OCE: A valid subtype for the SCCCA_STYLECHANGE type, indicating a change in the character set in the original document.

  • dwDatan: Return additional information based on dwType and dwSubType. For example, dwData2 returns the input file's initial character set.

  • dwDataBufSize: Returns the actual size of the data placed in the buffer pointed to by pDataBuf.