# %startlistilocks() function

The %startlistilocks() function prepares for calls to the
 %listitemlocksfilter() function and the %endlistilocks()
 function.

| Input | hostFSI | The FSI server from which to acquire the list of item locks. |
| --- | --- | --- |
| Output | handle | A handle to the resource. This handle is used when calling the %listitemlocksfilter() and %endlistilocks() functions. |

## Syntax

```
 code = %startlistilocks( hostFSI, &handle )
```

## Description

To compile successfully, the cfunction fsi.builtin statement must be
 included in the source code.

 If a value other than 0 is returned, then the call failed. This function is used to prepare
 for calls to the %listitemlocksfilter() and
 %endlistilocks() functions.

## Example(s)

```

 cfunction fsi.builtin
 hostFSI = "myserver"
 handle = 0
 code = %startlistilocks( hostFSI, &handle )
 filter = ""
 bufferLength = 1000000
 Char buffer[ bufferLength ]
 bufferLength = %listitemlocksfilter( handle, filter, buffer, bufferLength )
 Crt buffer[ 1, bufferLength ]
 code = %endlistilocks( handle )
```

 Note: For a use case, see dm,bp, nt_list-ilocks.

## See also

- [cfunction statement](https://d3codex.com/pickbasic-flashbasic/cfunction-statement/)
- [%endlistilocks() function](https://d3codex.com/pickbasic-flashbasic/percent-endlistilocks-function/)
- [%listitemlocksfilter() function](https://d3codex.com/pickbasic-flashbasic/percent-listitemlocksfilter-function/)
- [nt_list-ilocks command](https://d3codex.com/tcl/nt-list-ilocks/)

---
Source: https://d3codex.com/pickbasic-flashbasic/percent-startlistilocks-function/ - part of the D3Codex reference.
