LEADTOOLS Raster Imaging C DLL Help > Function References > L_ReadFileComment |
#include "l_bitmap.h"
L_LTFIL_API L_INT L_ReadFileComment(pszFile, uType, pComment, uLength, pLoadOptions)
L_TCHAR* pszFile; |
/* character string containing the input file name */ |
L_UINT uType; |
/* type of comment */ |
L_UCHAR* pComment; |
/* pointer to your buffer for the comment field */ |
L_UINT uLength; |
/* size of your buffer for the comment field */ |
pLOADFILEOPTION pLoadOptions; |
/* pointer to optional extended load options */ |
Gets a comment field from a file.
Parameter |
Description |
pszFile |
Character string containing the input file name. |
uType |
The type of comment. Refer to Types of File Comments. |
pComment |
Pointer to your buffer that will hold the comment field, including the terminating NULL. You can pass NULL if you only want to get the length of the field (the return value). |
uLength |
The size of your buffer that will hold the comment field. |
pLoadOptions |
Pointer to optional extended load options. Pass NULL to use the default load options. |
Returns
>=0 |
Length of the comment field. |
< 0 |
An error occurred. Refer to Return Codes. |
Comments
Some file formats can contain comments, and some cannot, and each file format has its own set of comment types. When you save a file, the comments, which LEADTOOLS maintains in a global array, are saved in the file. The index into the array (specified using a constant) determines the type of comment, as described in Types of File Comments.
Before saving a file, you use the L_SetComment function to specify the comments to be saved.
The L_ReadFileComment function lets you read comments that are already saved in a file header. For more information refer to the L_SetComment function.
Note: |
More options are available in the LOADFILEOPTION structure. |
Required DLLs and Libraries
LTFIL 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, Linux.
See Also
Functions: |
L_FileInfo, L_FileInfoMemory, L_ReadFileCommentMemory, L_GetPCDResolution, L_SetPCDResolution, L_GetWMFResolution, L_SetWMFResolution, L_SetLoadInfoCallback, L_GetComment, L_DeleteComment, L_SetComment, L_ReadFileCommentOffset, L_ReadFileComments |
Topics: |
|
|
|
|
For a list of functions that utilize the LOADFILEOPTION or SAVEFILEOPTION structures, refer to Functions Utilizing the LOADFILEOPTION or SAVEFILEOPTION structures. |
Example
Refer to L_SetComment.