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

Parameter

Description

parameter

The following parameter, defined in md.h, may be queried:

MDP_MAX_BUFFER_LENGTH

Value: 1

The recommended maximum buffer size (in bytes) for messages that can be sent using the MD library. While messages larger than this buffer size may be accepted by the library, exceeding it is not recommended. Different HSM access providers have different values for this parameter. When this parameter returns 0 via pValue, 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, which has the following buffer requirements:

MDP_MAX_BUFFER_LENGTH, unsigned integer

Size: 4 bytes

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.

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

N/A

MDR_INVALID_PARAMETER

If the pointer supplied for pReq is NULL, if the request requires a response and the pointer supplied for pResp is NULL or if pReserved is not zero.