L_SetPSTOptions

#include "l_bitmap.h"

L_LTFIL_API L_INT L_SetPSTOptions(pOptions)

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

Parameters

pFILEPSTOPTIONS pOptions

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

Returns

Value Meaning
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 Default value
uMessageNumber 0
uFlags 0

Required DLLs and Libraries

Platforms

Win32, x64.

See Also

Functions

Topics

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.2020.4.3
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C API Help