beautypg.com

Mcpcall, Parameters – MagTek MAGTEK User Manual

Page 71

background image

Section 5. Application Programmable Interface


65

McpCall

This function is used to execute an MCP command request. Commands can be issued to the
MCP device or MCP device application embedded within the MCP device.


DWORD McpCall( HANDLE hDevice, PMCPBUS pMCPBUS );

Parameters

hDevice

Handle to the specified device (communications resource) that is to execute the command. 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

dwApplicationID

Device Application ID.

dwCommandID

Command Code. Specific command to be executed by the application.

lpInBuffer

Pointer to storage buffer containing addition data associated with the
command.

dwInBufferLen

Length (in bytes) of data contained in the Input Buffer pointed to by
lpInBuffer

lpOutBuffer

Pointer to storage buffer to receive the response from the application

dwOutBufferSize

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


The following members are used as output parameters.

Member

Meaning

dwResultCode

Result Code. Refer to the device's Command Reference for possible
values.

lpOutBuffer

Pointer to storage buffer containing the response from the application

dwResponseLen

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