Share via


RemoteOrderDisplay.RestoreVideoRegion Method

2/27/2008

Restores a previously saved video region of the display area from the requested bufferId for the specified video unit(s).

Namespace: Microsoft.PointOfService
Assembly: Microsoft.PointOfService (in microsoft.pointofservice.dll)

Syntax

'Declaration
Public MustOverride Sub RestoreVideoRegion ( _
    units As DeviceUnits, _
    targetRow As Integer, _
    targetColumn As Integer, _
    bufferId As Integer _
)
public abstract void RestoreVideoRegion (
    DeviceUnits units,
    int targetRow,
    int targetColumn,
    int bufferId
)
public:
virtual void RestoreVideoRegion (
    DeviceUnits units, 
    int targetRow, 
    int targetColumn, 
    int bufferId
) abstract
public abstract void RestoreVideoRegion (
    DeviceUnits units, 
    int targetRow, 
    int targetColumn, 
    int bufferId
)
public abstract function RestoreVideoRegion (
    units : DeviceUnits, 
    targetRow : int, 
    targetColumn : int, 
    bufferId : int
)

Parameters

  • units
    The units to operate on.
  • targetRow
    The start row of the target location.
  • targetColumn
    The start column of the target location.
  • bufferId
    Number identifying the source video buffer to use. Valid values range from 1 to the VideoSaveBuffers property for the selected unit(s).

Remarks

A region can be saved by using the SaveVideoRegion method. The number of video buffers supported is stored in the VideoSaveBuffers property for each video unit online. The target location is defined by the targetRow and targetColumn parameters. RestoreVideoRegion does not free the memory after restoring. Therefore, RestoreVideoRegion can be used to copy a video region to multiple locations on the display. Use the FreeVideoRegion method to free any memory allocated for a video buffer.

If the bufferId does not contain a previously saved video region for the units selected, an ExtendedErrorNoRegion exception is thrown.

Video regions cannot be restored between video units. For example, the SaveVideoRegion method is called by using units = 0000 1000 and bufferId = 1. This will save a video region for the Unit Id 4, in to Buffer 1 for that unit. If this method is called by using units = 0000 0100 and bufferId = 1 with the intention of restoring the previously saved buffer to Unit Id 3, then either an ExtendedErrorNoRegion is thrown, or an unwanted region would be restored.

RestoreVideoRegion is performed synchronously if AsyncMode is false, and asynchronously if AsyncMode is true.

ResetVideoRegion may cause a PosControlException to be thrown with the following ErrorCode:

Value

Description

ExtendedErrorNoRegion

The bufferId does not contain a previously saved video region.

Failure

An error occurred while communicating with one of the video units specified by units. The ErrorUnits and ErrorString properties are updated before return. (Can only occur if AsyncMode is false.)

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread-safe. Any instance members are not guaranteed to be thread-safe.

See Also

Reference

RemoteOrderDisplay Class
RemoteOrderDisplay Members
Microsoft.PointOfService Namespace
AsyncMode
ErrorString
ErrorUnits
VideoSaveBuffers
SaveVideoRegion