Share via


INuiFrameTexture::LockRect Method

Kinect for Windows 1.5, 1.6, 1.7, 1.8

Locks the buffer for read and write access.

Syntax

public:
HRESULT LockRect(
         UINT Level,
         NUI_LOCKED_RECT *pLockedRect,
         RECT *pRect,
         DWORD Flags
)

Parameters

  • Level
    Type: UINT
    [in] Unused; must be 0.
  • pLockedRect
    Type: NUI_LOCKED_RECT
    A pointer to a NUI_LOCKED_RECT structure that receives information about the locked region.
  • pRect
    Type: RECT
    [in] Unused.
  • Flags
    Type: DWORD
    [in] Unused.

Return Value

Type: HRESULT
Returns S_OK if successful; otherwise, returns a failure code.

Error Description
E_INVALIDARG The Level parameter is not zero.
E_OUTOFMEMORY The texture buffer could not be allocated.
E_POINTER The pLockedRect parameter is NULL or the texture has zero height.

Requirements

Header: Declared in NuiSensor.h; however, include NuiApi.h in your project.