MD_GetParameter

This function obtains the value of a system parameter.

Synopsis
#include <md.h>
MD_RV MD_GetParameter(MD_Parameter_t parameter,
                      void*pValue,
                      unsigned int valueLen);
Input Requirements

The message dispatch library has been initialized via the MD_Initialize() function.

Input Parameters

The parameter to query. The following parameter may be queried. The parameter is defined in md.h

Parameter Meaning
MDP_MAX_BUFFER_LENGTH The recommended maximum buffer size, in number of bytes, for messages that can be sent using the MD library. While messages larger than this buffer size can be accepted by the library, it is not recommended to do so.  Different types of HSM access providers have different values for this parameter. When this parameter returns 0 via pValue this means that there is no limit to the amount of data that can be sent using this library.
pValue The address of the buffer to hold the parameter value. The memory for the buffer must be allocated in the context of the application which calls the function. The size of the buffer is determined by the parameter that is being obtained.

The following table specifies the buffer requirements for the parameter.

Parameter Size Meaning
MDP_MAX_BUFFER_LENGTH 4 bytes Unsigned integer
valueLen The length of the buffer, pValue in bytes. If the buffer length is not correct MDR_INVALID_PARAMETER is returned.
Output Requirements

The function returns the following codes:

Function Code Qualification
MDR_OK No error.
MDR_UNSUCCESSFUL The pointer supplied for pReq is NULL. The request requires a single response and the pointer supplied for pResp os NULL, or pReserved is not zero.