Retrieves the information for a specific filter.
static L_INT LBaseFile::GetFilterInfo(pFilterName, pFilterInfo, uStructSize)
Pointer to a character string that contains three characters identification of the filter name. This string cannot be NULL.
Pointer to a FILTERINFO structure to be updated with the filter information. This parameter cannot be NULL. The user is responsible to allocate memory for this parameter before pass it to the function.
Size in bytes, of the structure pointed to by pFilterInfo, for versioning. Use sizeof(FILTERINFO).
|SUCCESS||The function was successful.|
|< 1||An error occurred. Refer to Return Codes.|
To obtain the information of a specific filter, the user should pass the three-character identification (not case-sensitive) of the filter name to the pFilterName parameter of the function. For example, if the user passed "TIF" (or "tif," or "Tif"), then the pFilterInfo parameter will be updated with the information of the LFTIF filter, and the szName member of the pFilterInfo parameter will be "LFTIF1??".
If pFilterName or pFilterInfo parameter passed as NULL, the function will fail and return ERROR_NULL_PTR error code.
If the value of the uStructSize parameter is incorrect, the function will fail and return ERROR_INVALID_STRUCT_SIZE error code.
When a pFilterInfo pointer is no longer needed, call the LBaseFile::FreeFilterInfo(pFilterInfo, 1, 0) function to free the allocated memory stored inside the pFilterInfo parameter.
To update the information of the obtained filter, call LBaseFile::SetFilterInfo function.
To update the filter extension list, be sure to save and restore the original filter list before calling LBaseFile::FreeFilterInfo function.
To obtain the information for all the filters, call the LBaseFile::GetFilterListInfo function.
// Get the filter information (including the usual extension list)
nRet = LBaseFile::GetFilterInfo(TEXT("PCL"), &FilterInfo, sizeof(FILTERINFO));
// Remove the FILTERINFO_CHECKEDBYFILEINFO flag. This will make
// LBaseFile::GetInfo check this filter only if the extension is in the usual extension list
FilterInfo.uFlags = FilterInfo.uFlags & ~FILTERINFO_CHECKEDBYFILEINFO;
// Update the filter information.
// Note1: This will affect all the threads!
// Note2: LBaseFile::GetFilterInfo has set FilterInfo.uStructSize,
// So I do not have to manually set it. You should set it if you manually
// Fill all members of FilterInfo
nRet =LBaseFile::SetFilterInfo(&FilterInfo, 1, 0);
// Free the FilterInfo structure (contents only!) that was allocated with LBaseFile::GetFilterInfo
nRet = LBaseFile::FreeFilterInfo(&FilterInfo, 1, 0);
Medical Web Viewer .NET
.NET, Java, Android, and iOS/macOS Assemblies
C API/C++ Class Libraries