Surface.LockRectangle Method
Locks a rectangle on a surface.
Namespace: Microsoft.WindowsMobile.DirectX.Direct3D
Assembly: Microsoft.WindowsMobile.DirectX (in microsoft.windowsmobile.directx.dll)
Syntax
'Declaration
Public Function LockRectangle ( _
rectangle As Rectangle, _
flags As LockFlags, _
<OutAttribute> ByRef pitch As Integer _
) As GraphicsStream
'Usage
Dim instance As Surface
Dim rectangle As Rectangle
Dim flags As LockFlags
Dim pitch As Integer
Dim returnValue As GraphicsStream
returnValue = instance.LockRectangle(rectangle, flags, pitch)
public GraphicsStream LockRectangle (
Rectangle rectangle,
LockFlags flags,
out int pitch
)
public:
GraphicsStream^ LockRectangle (
Rectangle rectangle,
LockFlags flags,
[OutAttribute] int% pitch
)
public GraphicsStream LockRectangle (
Rectangle rectangle,
LockFlags flags,
/** @attribute OutAttribute() */ /** @ref */ int pitch
)
Not applicable.
Parameters
- rectangle
A Rectangle that represents the rectangle to lock.
- flags
A LockFlags object that specifies the type of lock to apply.
- pitch
Integer that represents the returned pitch value of the locked region.
Return Value
A GraphicsStream that describes the locked region.
Exceptions
Exception type | Condition |
---|---|
The method call is invalid. For example, a method's parameter may contain an invalid value. |
Remarks
For performance reasons, dirty regions are recorded only for level zero of a texture. Dirty regions are automatically recorded when this method is called without a LockFlags specification of NoDirtyUpdate or ReadOnly. For more information, see UpdateTexture of a Device.
A multisample back buffer cannot be locked.
Platforms
Windows CE, Windows Mobile for Pocket PC, Windows Mobile for Smartphone
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.
Version Information
.NET Compact Framework
Supported in: 2.0
See Also
Reference
Surface Class
Surface Members
Microsoft.WindowsMobile.DirectX.Direct3D Namespace