Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Locks a rectangle on a surface.
Namespace: Microsoft.WindowsMobile.DirectX.Direct3D
Assembly: Microsoft.WindowsMobile.DirectX (in Microsoft.WindowsMobile.DirectX.dll)
'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
)
member LockRectangle :
rectangle:Rectangle *
flags:LockFlags *
pitch:int byref -> GraphicsStream
- rectangle
Type: System.Drawing.Rectangle
A Rectangle that represents the rectangle to lock.
- flags
Type: Microsoft.WindowsMobile.DirectX.Direct3D.LockFlags
A LockFlags object that specifies the type of lock to apply.
- pitch
Type: System.Int32%
Integer that represents the returned pitch value of the locked region.
Type: Microsoft.WindowsMobile.DirectX.GraphicsStream
A GraphicsStream that describes the locked region.
Exception | Condition |
---|---|
InvalidCallException | The method call is invalid. For example, a method's parameter may contain an invalid value. |
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.
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Supported in: 3.5, 2.0