Skip Headers
Oracle® Outside In Search Export Developer's Guide
Release 8.3.7

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

Go to previous page
Previous
Go to next page
Next
View PDF

5 Export Functions

This chapter outlines the basic functions used to initiate the conversion of documents using the product API.

5.1 General Functions

The following functions are general functions used in most products.

5.1.1 EXOpenExport

This function is used to initiate the export process for a file that has been opened by DAOpenDocument. If EXOpenExport succeeds, EXCloseExport must be called regardless of any other API calls.

Prototype

SCCERR EXOpenExport(
   VTHDOC       hDoc,
   VTDWORD      dwOutputId,
   VTDWORD      dwSpecType,
   VTLPVOID     pSpec,
   VTDWORD      dwFlags,
   VTSYSPARAM   dwReserved,
   VTLPVOID     pCallbackFunc,
   VTSYSPARAM   dwCallbackData,
   VTLPHEXPORT  phExport);

phExport is not a file handle.

Parameters

  • hDoc: A handle that identifies the source file, created by DAOpenDocument. Knowledge of this should only affect OEMs under the most unusual of circumstances.

  • dwOutputId: File ID of the desired format of the output file. This value must be set to the following values:

    • FI_SEARCHML_LATEST

    • FI_PAGEML

    • FI_SEARCHTEXT

    • FI_SEARCHHTML

  • dwSpecType: Describes the contents of pSpec. Together, dwSpecType and pSpec describe the location of the initial output file. Must be one of the following values:

    • IOTYPE_ANSIPATH: Windows only. pSpec points to a NULL-terminated full path name using the ANSI character set and FAT 8.3 (Win16) or NTFS (Win32 and Win64) file name conventions.

    • IOTYPE_UNICODEPATH: Windows only. pSpec points to a NULL-terminated full path name using the Unicode character set and NTFS file name conventions.

      Note:

      If you are using IOTYPE_UNICODEPATH as a file spec type, if the calling application is providing an export callback function, you should set the option SCCOPT_EX_UNICODECALLBACKSTR to TRUE. Refer to the documentation on callbacks such as EX_CALLBACK_ID_CREATENEWFILE and the EXURLFILEIOCALLBACKDATAW structure for details
    • IOTYPE_UNIXPATH: X Windows on UNIX platforms only. pSpec points to a NULL-terminated full path name using the system default character set and UNIX path conventions.

    • IOTYPE_REDIRECT: All platforms. A pointer to a BASEIO structure filled in by your application. This must not be set to NULL or conversion fails.

  • pSpec: Initial output file location specification. The form of this data depends on the value of the dwSpecType parameter (see above).Initial output file location specification. This is either a pointer to a buffer or NULL.

  • dwFlags: Must be set by developer to 0.

  • dwReserved: Reserved. Must be set by developer to 0.

  • phExport: Pointer to a handle that receives a value uniquely identifying the document to the product routines. If the function fails, this value is set to VTHDOC_INVALID.

Return Values

  • SCCERR_OK: If the open was successful. Otherwise, one of the other SCCERR_ values in sccerr.h is returned.

5.1.2 EXCloseExport

This function is called to terminate the export process for a file.

Prototype

SCCERR EXCloseExport(
   VTHEXPORT   hExport);

Parameters

  • hExport: Export handle for the document. Must be a handle returned by the EXOpenExport function.

Return Values

  • SCCERR_OK: Returned if the close was successful. Otherwise, one of the other SCCERR_ values in sccerr.h is returned.

5.1.3 EXRunExport

This function is called to run the export process.

Prototype

SCCERR EXRunExport(
   VTHEXPORT   hExport);

Parameters

  • hExport: Export handle for the document. Must be a handle returned by the EXOpenExport function.

Return Values

  • SCCERR_OK: Returned if the export was successful. Otherwise, one of the other SCCERR_ values in sccerr.h is returned.

5.1.4 EXExportStatus

This function is used to determine if there were sub-document conversion failures in a SearchML 3.x export.

Prototype

SCCERR EXExportStatus(VTHEXPORT hExport, VTDWORD dwStatusType, VTLPVOID pStatus)

Parameters

  • hExport: Export handle for the document.

  • dwStatusType: Currently only EXSTATUS_SUBDOC.

  • pStatus: Pointer to a EXSUBDOCSTATUS data structure.

Return Values

  • SCCERR_OK: Returned if the open was successful. Otherwise, one of the other SCCERR_ values in sccerr.h is returned.

5.1.4.1 EXSUBDOCSTATUS Structure

The EXSUBDOCSTATUS structure is defined as follows:

typedef struct EXSUBDOCSTATUStag
{
   VTDWORD dwSize;      /* size of this structure */
   VTDWORD dwSucceeded; /* number of sub documents that were 
                           converted */
   VTDWORD dwFailed;    /* number of sub documents that were not 
                           converted */
} EXSUBDOCSTATUS;