BALTECH SDK wrapper functions reference

§ brp_VHL_GetFileInfo()

brp_errcode brp_VHL_GetFileInfo ( brp_VHL_GetFileInfo_t  params)

This command returns the available size of the VHL-file whose ID is specified by the ID parameter.

Two values are returned: the length of the VHL-file (Len) and the size of a single block (BlockSize).

The size of the returned value Len indicates the maximum number of bytes which can be read/written with the brp_VHL_Read() or brp_VHL_Write() commands. Attempting to read or write a larger amount of Bytes with brp_VHL_Read() or brp_VHL_Write() will generate an error status code (BRP_VHL_ErrRead or::BRP_VHL_ErrWrite ).

If the card system organizes its memory in blocks, BlockSize returns the size of a single block. If the memory is not organized in blocks, 1 will be returned. 0 will be returned if the block sizes are not unique (currently, there is no such card system in existence).

This command can only be executed if a card is selected, e.g. with a previous call of brp_VHL_Select() .

The returned VHL-file size corresponds to the reader's configuration values. It does not necessarily guarantee that a file of the returned sized can be read on the card. In some cases, the actual size of the card may be smaller than the returned VHL-file size.

Parameters
[in]paramsStruct with the following fields:
  • protocol used to execute the command
  • Id (in) ID of VHL-file in configuration memory (starting at 0). To keep your application ConfigEditor compatible do not hardcode this ID in your application, but resolve it from a name via brp_VHL_ResolveFilename() .
  • Len (out) Size of VHL-file in bytes.
  • BlockSize (out) Size of a single block.