## SLPClose

### Declaration

`#include <slp.h>`

`void SLPClose(SLPHandle hslp)`

### Description

Frees all resources associated with the handle. If the handle was invalid, the functions returns silently. Any outstanding synchronous or asynchronous operations are canceled so their callback functions will not be called any longer.

In the OpenSLP implementation, SLPHandles are used to cache information that is costly to obtain (in terms of network usage and time). Since the RFC 2614 API does not provide function calls to for library initialization, OpenSLP keeps track of the number of SLPHandles that are open. Several global library data structures are initialized when the first SLPHandle is opened and maintained until the last SLPHandle is closed. Therefore, it is most efficient to leave SLPHandles open for as long as you will need them (often for the entire life of a process). If you can help it, DO NOT make a habit of opening and closing SLPHandles frequently.

### Parameters

hslp | An open `SLPHandle` that was returned by `SLPOpen()`

### Returns

None

### Status

OpenSLP 0.6.0 | Fully implemented as specified by RFC 2614

### See Also

`SLPOpen()`