It is not possible to lock the webcam. Are you getting an error message? If so, what does the message say?
It says your camera has been blocked
This is a Simple Dialog Demo.