LFile::GetCommentSize

Summary

Gets the size, in bytes, of the requested comments.

Syntax

#include "ltwrappr.h"

virtual L_INT LFile::GetCommentSize(uType, puSize, pLoadFileOption=NULL)

Parameters

L_UINT uType

The type of comment. Refer to Types of File Comments. A group of comments may be obtained such as CMNT_FPXSUMMARYINFORMATION, or more than one group of comments may be retrieved by using OR as in CMNT_FPXSUMMARYINFORMATION | CMNT_FPXFILESOURCEGROUP, or all comments may be obtained by using CMNT_ALL. See "Example" under LFile::ReadComment. For more information concerning FlashPix file comments,see FlashPix File Comments.

L_UINT * puSize

Pointer to a variable to be updated with the size of the comments requested, in bytes.

pLOADFILEOPTION pLoadFileOption

Pointer to optional extended load options. Pass NULL to use the default load options.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

Presently this function only works with FlashPix files.

To write comments to a file, all the comments you wish to add to a file must be set using LFileSettings::SetComment. LFileSettings::SetComment sets each comment individually, but it does not save the comments to the file, it prepares the values for the next save. Once all comments are set, the comments are saved using any function which saves files, such as LFile::SaveFile or LFile::Save when creating a new file. If you wish to change a comment in an existing file, use LFile::WriteComment.

The basic order of function calls for reading comments is as follows:

  1. Get the size of the comments with LFile::GetCommentSize
  2. Allocate a buffer of a corresponding size.
  3. Read the comments with LFile::ReadComment
  4. Free the buffer

Required DLLs and Libraries

Platforms

Win32, x64.

See Also

Functions

Topics

Example

For an example, refer to LFile::ReadCommentExt.

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C++ Class Library Help

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.