L_SetPSTOptions - Raster Imaging C API Help

L_SetPSTOptions

#include "l_bitmap.h"

L_LTFIL_API L_INT L_SetPSTOptions(pOptions)

pFILEPSTOPTIONS pOptions;

pointer to a structure

Sets the file options used by LEADTOOLS when loading PST files.

Parameter

Description

pOptions

Pointer to the pFILEPSTOPTIONS structure that contains the options to use when loading PST files.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

The uStructSize member of the FILEPSTOPTIONS structure must be set before calling this function. If a PST file is loaded without first setting the options using this function, the following default values will be used for the FILEPSTOPTIONS members:

The uMessageNumber member of the FILEPSTOPTIONS structure determines the message to be loaded from the PST file. The uFlags member of the FILEPSTOPTIONS structure is used to control message loading options such as loading as plain text only, loading as original RTF or HTML format, loading the whole message in one single page or loading as multipage. If not determined the following default values are used:

Member

Value

uMessageNumber 0
uFlags 0

Required DLLs and Libraries

LTFIL
File format DLLs

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Platforms

Win32, x64.

See Also

Functions: L_GetPSTOptions
Topics: Raster Image Functions: Loading Files
Loading and Saving Images
Functions Utilizing the LOADFILEOPTION or SAVEFILEOPTION structures

Example

This example loads a PST file, with a resolution defined by the user.

L_INT SetPSTOptionsExample(L_TCHAR       *pszPSTFileName, 
                                          pBITMAPHANDLE  pBitmap) 
{ 
   L_INT nRet; 
   FILEPSTOPTIONS PstOptions; 
   PstOptions.uStructSize = sizeof(FILEPSTOPTIONS); 
 
   /* Get the current PST option */ 
   nRet = L_GetPSTOptions(&PstOptions, sizeof(FILEPSTOPTIONS)); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   /*Choose certain message */ 
   PstOptions.uMessageNumber = 5; 
 
   /* Choose to load message as plain text only*/ 
   PstOptions.uFlags = PST_FLAGS_MESSAGE_PLAINTEXT; 
 
   /* Set new PST option */ 
   nRet = L_SetPSTOptions(&PstOptions); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   /* Now load the PST file */ 
   nRet = L_LoadBitmap(pszPSTFileName, pBitmap, sizeof(BITMAPHANDLE), 24, ORDER_BGR, NULL, NULL); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   return SUCCESS; 
} 

Help Version 20.0.2018.7.30
Products | Support | Contact Us | Copyright Notices
© 1991-2018 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C API Help