# PDL_GetParamString

## Description

Extracts a named string parameter passed to a service callback function. You can register a callback function with a service using the PDL_ServiceCallWithCallback API. All parameters are passed as strings, though their underlying types (`string`, `double`, or `int`) can be different.

This API returns an empty string if the parameter is not found. You can use the PDL_ParamExists API to check if the parameter exists before calling this API.

See Accessing Services for more information and examples.

## Syntax

>     void PDL_GetParamString(
>       PDL_ServiceParameters *params,
>       const char *name,
>       char *buffer,
>       int bufferLen
>     );

Argument | Description
--- | ---
params | Parameters from which to extract data. This is passed to the callback function from the service and you simply pass it on here without modification.
name | Name of the argument to extract.
buffer | Pointer to the buffer. Allocate enough memory for this to hold the anticipated value.
bufferLen | `buffer` length.

## Returns

>     the passed string, or an empty string if the parameter doesn't exist.

See also:

- PDL_ServiceCall
- PDL_ServiceCallWithCallback
- PDL_UnregisterServiceCallback
- PDL_GetParamDouble
- PDL_GetParamInt
- PDL_ParamExists