Performing BrowseAndLock on a group of messages allows an application to ensure that no other application is able to process messages when they are locked. The messages remain locked until that application unlocks them. No other application can unlock the messages. Any messages that arrive on the queue after the BrowseAndLock operation are not locked.
An application can perform either a get or a delete operation on the messages to remove them from the queue. To do this, the application must supply the lockID that is returned with the enumeration of messages.
Specifying the lockID allows applications to work with locked messages without having to unlock them first.