API Reference | developer.brewmp.com API Reference | developer.brewmp.com

Developer

API Reference

IVERSION_GETPRODUCTNAME()

Brew Release
Brew MP 1.0.2
See Also
None
Description
This method retrieves the product name of the installed component.
Params
po
[]:
[in] A pointer to the IVersion object.
pszProdName
[]:
[out] On return, this will contain product name. The string will be NULL terminated. pszProdName is a pre-allocated buffer to store product name.
nProdNameLen
[]:
[in] The total size (in bytes) of the pszProdName buffer.
pnProdNameLenReq
[]:
[out] On return, this will contain total size (in bytes) of the buffer required to hold product name including the NULL termination character.

Interface
Prototype
  •    int IVersion_GetProductName(IVersion *po, 
                                   char *pszProdName, 
                                   int nProdNameLen, 
                                   int *pnProdNameLenReq);
Return
  • SUCCESS: on success.
    Error code otherwise.
Side Effect
  • None
Comments
This function should be called once with nProdNameLen set to zero to determine the required amount of space to buffer the product name. The caller should then allocate the required amount of memory and call this function again to retrieve the value. If size of buffer is less than length of product name, then the function will fill the buffer with the truncated product name and will NULL terminate the string.