UM0516
Files library
3.3.4
FILES_DestroyImageElement
FILES_DestroyImageElement (HANDLE Handle, DWORD dwRank)
Removes the ELEMENT located on the dwRank index in the given image.
Table 36. FILES_DestroyImageElement description
Field
Type
Description
pHandle PHANDLE Image handle
Input DWORD dwRank Element index
Output
DWORD SUCCESS, Error otherwise (see Error codes).
3.3.5
FILES_DuplicateImage
FILES_DuplicateImage (HANDLE hSource, PHANDLE pDest)
Creates a copy of the given hSource image in the pDest image.
Table 37. FILES_DuplicateImage description
Field
Type
Description
hSource HANDLE Original image handle
Input
pDest PHANDLE Pointer to the duplicated image handle
Output
DWORD SUCCESS, Error otherwise (see Error codes).
3.3.6
FILES_FilterImageForOperation
FILES_FilterImageForOperation (HANDLE Handle, PMAPPING pMapping,
DWORD Operation, BOOL bTruncateLeadFFForUpgrade)
Filters an image for the given operation. bTruncateLeadFFForUpgrade is used for
UPGRADE and ERASE operations to remove all 256-byte packets that contain only FFh
data, if needed.
Table 38. FILES_FilterImageForOperation description
Field
Type
Description
Handle
HANDLE Pointer to the image handle.
pMapping
PMAPPING Pointer to the mapping.
Input
Operation
DWORD
Operation code. The operation code can be
set to the following values:
OPERATION_UPLOAD (02h),
OPERATION_ERASE (03h),
OPERATION_DNLOAD (04h)
bTruncateLeadFFForUpgrade BOOL
Truncate if TRUE.
Output
DWORD
SUCCESS, Error otherwise (see Error
codes).
Doc ID 14490 Rev 2
21/26
    "