ImageBuffer.Lock Method

Locks the buffer
Syntax:
Public Sub Lock()
Remarks:

Increments the lock count of the buffer by one, so that the control does not overwrite the data in the ImageBuffer. Each call to lock must be matched with a call to ImageBuffer.Unlock, so that the buffer can be used again by the control.

Sample:

This example locks and unlocks an ImageBuffer:

Dim Buf As ImageBuffer
Set Buf = ICImagingControl1.ImageBuffer.Item(1)
Buf.Lock
' do a lengthy operation
Buf.Unlock

A sample on how to use ImageBuffer and ImageBuffer.Lock is shown in Performing Advanced Image Processing.

See also: ImageBuffer, ImageBuffer.Unlock, ImageBuffer.ForceUnlock, ImageBuffer.Locked, ImageBuffer.WasLockedFlag

<< ImageBuffer