Try to lock the current layer. If it is already locked this function will return FALSE, TRUE otherwise. If the layer could be locked successfully nesting will take place which means that for every successful locking of a layer UnlockLayerRom() has to be called for that layer to let other tasks access that layer.
INPUTS
l
pointer to layer
RESULT
TRUE - layer is successfully locked for the task FALSE - layer could not be locked, it's locked by another task.