Overview
C API (Component Interface)
struct EventGetParameterString { UINT32 flags; const char* parameter; char* buffer; UINT32 bufferSize; };

Get the value of an Execution Parameter.

Contract Wrappers

1199
getParameterString()

Fields

UINT32 flags IN
None defined (must be zero).
const char* parameter IN
The name of the parameter.
char* buffer IN/OUT
A pointer to a buffer in which the result will be written.
UINT32 bufferSize IN/OUT
The total number of bytes available in the buffer (i.e. including space for the NUL character).

Return Values

See also General Interface Return Values.

C_OK
E_OVERFLOW
If the buffer is not large enough to hold the result (in this case, bufferSize is set to the required size of the buffer).

Result

  • A formatted string is returned in buffer or an error is raised.

Example

Taken from 1199.

C++ Source Code (against 1199)
std::string getParameterString(Symbol hComponent, const char* parameter) { char buffer[256]; EventGetParameterString data; data.flags = 0; data.parameter = parameter; data.buffer = buffer; data.bufferSize = 256; EngineEvent event; event.hCaller = hComponent; event.flags = 0; event.type = ENGINE_EVENT_GET_PARAMETER_STRING; event.data = (void*) &data; ____SUCCESS(brahms_engineEvent(&event)); return buffer; }