[]
        
(Showing Draft Content)

C1.Util.DX.WIC.Bitmap.Lock

Lock Method

Lock(BitmapLockFlags)

Provides access to a rectangular area of the bitmap.

Declaration
public BitmapLock Lock(BitmapLockFlags flags)
Parameters
Type Name Description
BitmapLockFlags 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.

ValueMeaning
Read

The read access lock.

Write

The write access lock.

?

Returns
Type Description
BitmapLock

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.

Lock(RectL, BitmapLockFlags)

Provides access to a rectangular area of the bitmap.

Declaration
public BitmapLock Lock(RectL rcLockRef, BitmapLockFlags flags)
Parameters
Type Name Description
RectL rcLockRef

The rectangle to be accessed.

BitmapLockFlags 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.

ValueMeaning
Read

The read access lock.

Write

The write access lock.

?

Returns
Type Description
BitmapLock

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.

Lock(IntPtr, BitmapLockFlags)

HRESULT IWICBitmap::Lock([In] const void* prcLock,[In] WICBitmapLockFlags flags,[Out] IWICBitmapLock** ppILock)

Declaration
public BitmapLock Lock(IntPtr rcLockRef, BitmapLockFlags flags)
Parameters
Type Name Description
IntPtr rcLockRef
BitmapLockFlags flags
Returns
Type Description
BitmapLock