BALTECH SDK wrapper functions reference

§ brp_getenv()

BRP_LIB bool brp_getenv ( const char *  name,
char *  result,
size_t  len 
)

Retrieves the value of an environment variable.

This function provides a cross-platform way to access environment variables, ensuring that changes made after DLL loading are reflected (unlike some platform-specific implementations that cache environment variables).

Parameters
nameThe name of the environment variable to retrieve.
resultPointer to buffer where the value shall be stored.
lenSize of the result buffer in bytes. Must be large enough to hold the environment variable value plus null terminator. Is undefined if return value is false.
Returns
true on success (variable exists), false if not found, buffer too small, or error.