MagTek OMTD 99875144 User Manual

Page 21

Advertising
background image

Section 4. Control Objects


15

Property Name

Access

Type

Description

DataCount

R

LONG Number of enqueued data events at the control. The

default is 0.

DataEventEnabled

R/W

BOOL When TRUE, a DataEvent is delivered as soon as input

data is enqueued. The default is FALSE.

DeviceDescription R

BSTR

String

identifying the device (e.g., MICR Plus).

DeviceEnabled

R/W

BOOL When TRUE, the device is placed in an operational

state. When FALSE, any input is discarded and output
operations are disallowed. The default is FALSE.

DeviceName R

BSTR

Identifies

the

device

(e.g., friendly name of the device).

FreezeEvents R/W

BOOL

When TRUE, the control will not deliver events. The
default is FALSE.

OutputID

R

LONG Holds the identifier of the most recently started

asynchronous output.

PowerNotify R/W

LONG

Contains

the

type power notification selection made by

the application. The default is OPOS_PN_DISABLED.

PowerState R

LONG

Contains

the

current power condition, if it can be

determined. The default is OPOS_PS_UNKNOWN.

ResultCode

R

LONG Result code of the most recently invoked method.

ResultCodeExtended

R

LONG Contains extended result information when ResultCode

is set to OPOS_S_EXTENDED.

ServiceObjectDescription R BSTR

String

identifying the service object supporting the

device and the company that produced it (e.g., “OPOS
Common Service Object, © 1999 MagTek, Inc.”).

ServiceObjectVersion

R

LONG Service object version number.

State R

LONG

Contains

the

current state of the control.


Common Methods

The following methods are common to all OMTD control objects.

LONG Open (BSTR DeviceName)

Call to open a device for subsequent I/O.

When the Open method is successful, it sets the properties Claimed, DeviceEnabled, and
FreezeEvents, as well as descriptions and version numbers of the OPOS software layers (i.e. CO
and SO). Additional class-specific properties may also be initialized.

LONG Close 0

Called to release the device and its resources. If the DeviceEnabled property is TRUE, then the
device is first disabled. If the Claimed property is TRUE, then exclusive access to the device is
first released.

Advertising