The address of a void pointer that will identify the info process. Use this pointer with the L_FeedInfo and L_StopFeedInfo functions.
Pointer to the FILEINFO structure to be filled. For more information refer to FILEINFO structure.
Size in bytes, of the structure pointed to by
pFileInfo. Use sizeof(FILEINFO).
Flag indicating whether to update the TotalPages field in the FILEINFO structure. For more information, refer to the uFlags parameter in L_FileInfo.
Pointer to optional extended load options. Pass NULL to use the default load options.
|SUCCESS||The function was successful.|
|< 1||An error occurred. Refer to Return Codes.|
This file-info process is useful when receiving transmitted images, such as those on the Internet. It works the same way as the L_FileInfo function, except that your code supplies the image data. The file-info process works as follows:
You call the L_StartFeedInfo function to initialize the file-info process and identify the process with a void pointer
You create a buffer, and each time you fill it with information, you call the L_FeedInfo function, which sends the data to the file-info process just as if the data were being read from a file on disk.
Whenever it has enough data to do so, the file-info process behaves the same as in the L_FileInfo function.
The file-info process does not update the FILEINFO structure until it has received enough information to do so. (Usually, the information, such as the bitmap height and width, is in the file header.) The file-info process will return SUCCESS_ABORT whenever all required information is available.
To end the file-info process, you call the L_StopFeedInfo function, which cleans up the process. If you call this function before supplying enough data, it will successfully clean up the process, but will return a file-read error. You should trap the error if the process is canceled purposely.
Get the image information from the fields described in the FILEINFO structure.
For a summary of file information functions, refer to Getting and Setting File Information.
This function cannot be used in combination with L_RedirectIO.
Also, for information on loading an image using the same mechanism, refer to L_FeedLoad.
More options are available in the LOADFILEOPTION structure.
For information about loading and saving large TIFF files faster, refer to Loading and Saving Large TIFF/BigTIFF Files.
You should never pass an uninitialized FILEINFO structure to this function.
Required DLLs and Libraries
Win32, x64, Linux.
For complete sample code, refer to the FEEDINFO example. This example demonstrates the feed-load
feature by using the Windows GetTickCount function to simulate receiving a transmitted image. This
example gets file information and displays it in a message box.
set this define to change the simulated baud rate
must be a multiple of 100
#define SIMULATEDBAUDRATE 28800
L_INT StartFeedInfoExample(HWND hWnd)
L_TCHAR szMessage; /* Buffer to hold information for display. */
dwBaseTime = GetTickCount();
dwReceiveTotal = 0;
dwReceiveRead = 0;
hFileOpen = CreateFile( MAKE_IMAGE_PATH(TEXT("ImageProcessingDemo\\Image3.cmp")),
if( hFileOpen== NULL || hFileOpen == INVALID_HANDLE_VALUE)
memset(&FileInfo, 0, sizeof(FILEINFO));
FileInfo.uStructSize = sizeof(FILEINFO);
nRet = L_StartFeedInfo (&hInfo, &FileInfo, sizeof(FILEINFO), 0, NULL);
if (nRet != SUCCESS)
for( ; ; )
dwReceiveTotal = ((GetTickCount() - dwBaseTime) * (SIMULATEDBAUDRATE / 100) / 100);
nRead = (L_INT) min(dwReceiveTotal - dwReceiveRead, (L_UINT32) sizeof(cBuf));
if(!ReadFile(hFileOpen, cBuf, nRead, &dwNumOfBytesRead, NULL))
nRet = ERROR_FILE_READ;
nRet = L_FeedInfo (hInfo, cBuf, dwNumOfBytesRead);
if (nRet==SUCCESS_ABORT)//done, no more data needed
dwReceiveRead += (L_UINT32) dwNumOfBytesRead;
nRet = L_StopFeedInfo (hInfo);
/* Format the message string with data from the FILEINFO structure */
wsprintf(szMessage, TEXT("Filename: %s\n\n")
TEXT("Size On Disk: %ld\n\n")
TEXT("Size In Memory: %ld\n\n")
(L_TCHAR *) FileInfo.Name,
(L_TCHAR *) FileInfo.Compression);
/* Display the message string */
MessageBox( hWnd, szMessage, TEXT("File Information"), MB_OK );
Medical Web Viewer .NET
.NET, Java, Android, and iOS/macOS Assemblies
C API/C++ Class Libraries