beautypg.com

Mcpget, Parameters – MagTek MAGTEK User Manual

Page 67

background image

Section 5. Application Programmable Interface


61

McpGet

This function is used to get the value of a property from the MCP driver MCP device application.
Properties can be accessed through their property ID or property name.


DWORD McpGet( HANDLE hDevice, PMCPBUS pMCPBUS );

Parameters

hDevice

Handle to the specified device (communications resource) to get the property. This handle was
returned from the McpOpen function.

pMCPBUS

Pointer to the MCPBUS structure used by the MCP API function to perform this operation.
The following structure members are used as input parameters.

Member

Meaning

dwOperAttribute

MCP_ATTR_NONE

- get an MCP device property

MCP_ATTR_PROP_DRIVER - get an MCP driver property

dwApplicationID

Application ID (not used if MCP_ATTR_PROP_DRIVER is set)

lpszPropertyName Pointer

to

null terminated property name. NULL if using a Property ID

dwPropertyID

Property ID. Used only if lpszPropertyName is NULL and
MCP_ATTR_NONE is set in dwOperAttribute.

dwPropertyType

Property type. Used for type verification.

lpOutBuffer

Pointer to storage buffer to receive the property value

dwOutBufferSize

Size (in bytes) of storage buffer pointed to by lpOutBuffer


The following structure members are used as output parameters.

Member

Meaning

lpOutBuffer

The buffer pointed to by this member contains the returned property
value

dwResponseLen

Length (in bytes) of property value returned in the buffer pointed to by
lpOutBuffer