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

Part Number E12888-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.


Note:

SCCOPT_GRAPHIC_TYPE = FI_NONE must be set (via DASetOption) before the call to EXOpenExport. Otherwise, the SCCUT_FILTEROPTIMIZEDFORTEXT speed enhancement for the PDF filter is not set. This will result in slower exports of PDFs when graphic output is not required.

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. XML Export does this internally (when exporting graphics). 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 should be set to FI_XML_FLEXIONDOC_LATEST.

  • 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). 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.

  • pCallbackFunc: Pointer to a function of the type EXCALLBACKPROC. This function is used to give the developer control of certain aspects of the export process as they occur. See the definition for EXCALLBACKPROC in "EXCALLBACKPROC" for more details. This parameter may be set to NULL if the developer does not wish to handle callbacks.

  • dwCallbackData: This parameter ispassed transparently to the function specified by pCallbackFunc. The developer may use this value for any purpose, including passing context information into the callback function.

  • 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 EXCALLBACKPROC

Type definition for the developer's callback function.

Prototype

DAERR (DA_ENTRYMODPTR EXCALLBACKPROC)(
   VTHEXPORT    hExport,
   VTSYSPARAM   dwCallbackData,
   VTDWORD      dwCommandOrInfoId,
   VTLPVOID     pCommandOrInfoData);

Parameters

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

  • dwCallbackData: This value is passed to EXOpenExport in the dwCallbackData parameter.

  • dwCommandOrInfoId: Indicates the type of callback. See Chapter 7, "Callbacks" for information about supported callbacks.

  • pCommandOrInfoData: Data associated with dwCommandOrInfoId. See Chapter 7, "Callbacks" for information about supported callbacks.

Return Values

  • SCCERR_OK: Command was handled by the callback function.

  • SCCERR_BADPARAM: One of the function parameters was invalid.

  • SCCERR_NOTHANDLED: Callback function did not handle the command. This return value must be the default for all values of dwCommandOrInfoId the developer does not handle.

5.1.3 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.4 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.