ComponentOne Bitmap for WPF
C1.WPF.DX.4.6.2 Assembly / C1.Util.DX.WIC Namespace / Bitmap Class / Lock Method / Lock(RectL,BitmapLockFlags) Method

The rectangle to be accessed.

The access mode you wish to obtain for the lock. This is a bitwise combination of BitmapLockFlags for read, write, or read and write access.

Value Meaning
BitmapLockFlags.Read

The read access lock.

BitmapLockFlags.Write

The write access lock.

?


In This Topic
    Lock(RectL,BitmapLockFlags) Method
    In This Topic

    Provides access to a rectangular area of the bitmap.

    Syntax
    'Declaration
     
    Public Overloads Function Lock( _
       ByVal rcLockRef As RectL, _
       ByVal flags As BitmapLockFlags _
    ) As BitmapLock
    public BitmapLock Lock( 
       RectL rcLockRef,
       BitmapLockFlags flags
    )

    Parameters

    rcLockRef

    The rectangle to be accessed.

    flags

    The access mode you wish to obtain for the lock. This is a bitwise combination of BitmapLockFlags for read, write, or read and write access.

    Value Meaning
    BitmapLockFlags.Read

    The read access lock.

    BitmapLockFlags.Write

    The write access lock.

    ?

    Return Value

    A reference that receives the locked memory location.

    Remarks

    Locks are exclusive for writing but can be shared for reading. You cannot call CopyPixels while the Bitmap is locked for writing. Doing so will return an error, since locks are exclusive.

    See Also