Owner manual
Table Of Contents
- REGISTERED TO ISO 9001:2000
- SECTION 1. OVERVIEW
- SECTION 2. SYSTEM REQUIREMENTS
- SECTION 3. INSTALLATION
- INSTALLING THE MCP DRIVER
- CHANGING THE MCP DRIVER:
- REMOVING THE MCP DRIVERS
- DEVICE INSTANCE MANAGEMENT
- Device Instance Overview
- MCPCFG Utility Overview
- MCPCFG Command Summary
- Adding a Device Instance from Command Line – RS-232
- Adding a Device Instance from Command Line – USB
- Adding a Device Instance from Windows Based Application (WINDOWS 2000, XP) – RS-232
- Adding a Device Instance from Windows Based Application (WINDOWS 2000, XP) – USB
- Modifying a Device Instance Properties from Windows Based Application (WINDOWS 2000, XP) – RS-232 and USB
- Removing a Device Instance from Windows Based Application (WINDOWS 2000, XP) – RS232
- Removing a Device Instance from Windows Based Application (WINDOWS 2000, XP) – USB
- Removing a Device Instance from a Command Line – RS-232
- Removing a Device Instance from a Command Line – USB
- Displaying the List of Device Instances from Command Line
- Displaying Device Instance Properties from Command Line
- Modifying Device Instance Properties from Command Line
- Modifying Device Instance Properties From Windows Based Application
- Restarting the MCP Driver
- Stopping the MCP Driver From Command Line
- Windows Configuration Utility
- DEVICE INSTANCE PROPERTIES
- SECTION 4. TRACE LOG
- SECTION 5. APPLICATION PROGRAMMABLE INTERFACE
- TYPICAL OPERATION
- DEVICE CHANNEL LIFE CYCLE
- PROPERTIES
- COMMANDS
- NOTIFICATIONS
- FUNCTIONS
- Summary
- MCPBUS Structure
- Members
- Remarks
- The MCPBUS is used as an input parameter to many of the MCP API functions. The MCP driver modifies only those members explicitedly defined by the individual functions. For example, the API will not modify the lpOutBuffer or dwOutBufferSize members (the buffer that lpOutBuffer points to will of course be modified); therefore, the caller may set these values once and not need to reset them prior to invoking subsequent MCP API functions. The only structure members modified by an MCP API function are those explicitly identified as output parameters.
- McpEnum
- McpOpen
- McpClose
- McpReset
- McpGet
- McpCall
- McpWait
- CONSTANT DEFINITIONS
- FUNCTION PROTOTYPES
- INDEX

MagTek Communications Protocol, Driver Reference Manual
56
McpEnum
This function is used to enumerate (get the names of) all of the MCP compliant devices configured and
connected on the host computer.
DWORD McpEnum( PMCPBUS pMCPBUS );
Parameters
pMCPBUS
Pointer to the MCPBUS structure used by the MCP API function to perform its operation.
The following structure members are used as input parameters.
Member Meaning
dwContext
0 on first call (restart enumeration); value left unmodified on subsequent
invocations to get the next device name.
lpOutBuffer Pointer to storage buffer to receive the next device name.
dwOutBufferSize Size of buffer pointed to by lpOutBuffer
The following structure members are used as output parameters.
Member Meaning
dwContext Enumeration Context, used in subsequent calls to McpEnum (do not modify)
lpOutBuffer Buffer pointed to by this member contains the device name (null terminated)
dwResponseLen Length of device name (including terminating null) in output buffer
Return Value
The returned value indicates the outcome of the enumeration function.
Value Meaning
MCP_ST_OK
Success. The next device name is located in the callers Output Buffer
pointed to by lpOutBuffer.
MCP_ST_NOT_FOUND No more devices found or device not found
MCP_ST_OVERFLOW The Output Buffer is not large enough to hold the returned value
MCP_ST_FAILED Other error.
Remarks
The device name returned in the callers Output Buffer can be used in a subsequent McpOpen call. The
first time this function is called, the Context member is set to zero indicating to restart the enumeration
process. On subsequent calls, the Context member should be left unchanged so that the next device name
can be returned. By calling this function in a loop, a host application can enumerate all devices.