Hand Held Products PadCom TT1500 User Manual

Point-of-sale terminal control library
Table of Contents

Advertisement

Quick Links

PadCom
Point-of-Sale Terminal Control Library
U s e r ' s G u i d e

Advertisement

Table of Contents
loading

Summary of Contents for Hand Held Products PadCom TT1500

  • Page 1 PadCom Point-of-Sale Terminal Control Library ™ U s e r ’ s G u i d e...
  • Page 2 Data Collection, Inc. (d/b/a Hand Held Products) reserves the right to make changes in specifications and other information contained in this document without prior notice, and the reader should in all cases consult Hand Held Products to determine whether any such changes have been made. The information in this publication does not represent a commitment on the part of Hand Held Products.
  • Page 3: Table Of Contents

    Table of Contents Chapter 1 - Introduction and Installation Introducing Hand Held Products PadCom Library ................1-1 Features of PadCom Library ......................1-1 Hand Held Products Transaction Team Terminals Supported by PadCom........1-1 Installation ............................1-2 Transaction Team Device Overview ....................1-2 Aspect Ratio Considerations ......................1-2 Representing Pen Strokes......................1-2...
  • Page 4 padGetFontSize ..........................3-14 padGetInTimeout ..........................3-15 padGetMagTrack ..........................3-15 padGetMasterSessionBinaryPIN ......................3-16 padGetMasterSessionTextPIN ......................3-16 padGetMaxCardTracks ........................3-17 padGetMaxCardTrackSize .......................3-17 padGetModel ............................3-18 padGetNumVar ..........................3-18 padGetOutTimeout ...........................3-18 padGetPage ............................3-19 padGetPort ............................3-19 padGetPortAddr ..........................3-20 padGetPortIrq ...........................3-20 padGetPorts ............................3-20 padGetScanRate ..........................3-21 padGetTableItem ..........................3-21 padGetTime ............................3-21 padGetVersion ..........................3-22 padHeight ............................3-22 padHideTime ............................3-22 padHorzDPI ............................3-23 padInkExport ............................3-23...
  • Page 5 padPassThroughHandshaking ......................3-35 padPassThroughOff ..........................3-35 padPassThroughOn ...........................3-36 padPassThroughResetCodes ......................3-37 padPassThroughSetOffCode ......................3-37 padPassThroughSetOnCode ......................3-37 padPortReclaim ..........................3-38 padPortRelease ..........................3-38 padPromptHexNumber ........................3-39 padPromptNum ..........................3-39 padPromptNumber ..........................3-40 padPromptReset ..........................3-40 padPromptSignature .........................3-41 padPromptString ..........................3-41 padPromptTimeout ...........................3-42 padPutBits ............................3-42 padPutBmpFile ..........................3-42 padPutLogo ............................3-43 padPutText ............................3-43 padReadByte .............................3-44 padRecord ............................3-44 padReset ............................3-44 padResetArea ............................3-45...
  • Page 6 padSetPortAddr ..........................3-59 padSetPortHandle ..........................3-60 padSetPortIrq ............................3-60 padSetPorts ............................3-60 padSetScanRate ..........................3-61 padSetTime ............................3-61 padSetType ............................3-61 padSoundBell ............................3-62 padSoundEnable ..........................3-62 padSoundSetFreq ..........................3-63 padSoundTone ..........................3-63 padStop .............................3-64 padToHIENGLISH ...........................3-64 padToLOENGLISH ..........................3-64 padToHIMETRIC ..........................3-65 padToLOMETRIC ..........................3-65 padType ............................3-65 padUpdate ............................3-66 padVertDPI ............................3-66 padWidth ............................3-66 Chapter 4 - Supported Bitmap Format Chapter 5 - Sample Source Code PadCom Signature Capture Sample for DOS:..................5-1...
  • Page 7: Chapter 1 - Introduction And Installation

    Introducing Hand Held Products PadCom Library PadCom library by Hand Held Products is a tool that allows developers to interface to Transaction Team units easily and quickly. Developers can use PadCom library to capture signatures, read MSR, perform PINpad transactions, display text or bitmaps, and write innovative graphical interfaces.
  • Page 8: Installation

    Installation Hand Held Products’ PadCom Library comes bundled as a set of static libraries with operating system dependent (MS- ® ® ® ® , WIN16, and WIN32 ) and compiler dependent (Microsoft and Borland ) solutions available for your use. PadCom is part of the Software Development Kit (SDK) which is available in 16-bit or 32-bit versions, and is included on the Transaction Team 1500 and Transaction Team 3100 Series software suite CDs.
  • Page 9: Using Padcom

    Illustration of two pen strokes: Move to 4,1 Line to 4,4 Move to 3,2 Line to 5,2 begin first stroke continue first stroke begin a new stroke continue new stroke Using PadCom PadCom provides an interface that can be fully customized to Transaction Team pads. An operating system-dependent set of libraries are provided which use the most popular compilers to support a wide variety of development needs.
  • Page 10: Troubleshooting

    Technical Support at Hand Held Products. Hand Held Products strongly recommends that you always run the sample test programs you installed while installing the library components. Call Hand Held Products immediately if any of these sample programs do not work on the intended operating systems.
  • Page 11: Library Functions List By Transaction Team Pad Compatibility

    Library Reference Library Functions List by Transaction Team Pad Compatibility A blank in the model column indicates that the function is not supported for that model. Function TT1500 TT3100 Series padBinaryGetTable padBinaryGetVar padBox padClear padClearPixel padComDate padComVersion padConnect padConnectClearScreen padDisplayObject padDisplayTime padEchoComm padEraseTable...
  • Page 12 Function TT1500 TT3100 Series padGetMasterSessionTextPIN padGetMaxCardTracks padGetMaxCardTrackSize padGetModel padGetNumVar padGetOutTimeout padGetPage padGetPort padGetPortAddr padGetPortIrq padGetPorts padGetScanRate padGetTableItem padGetVersion padHeight padHideTime padHorzDPI padInkExport padInvert padIsKey padIsLcd padIsNewStroke padIsaReset padIsOn padIsPenDown padIsRecord padLcdHeight padLcdHorzDPI padLcdVertDPI padLcdWidth padLightOff padLightOn padLine padMemClear padMemDelete padMemDeleteVar padMemFind padMemGetChecksum padMemGetFree...
  • Page 13 Function TT1500 TT3100 Series padMemLoadBitmapFile padMemLoadText padMemReset padMemSetVar padName padNewX padNewY padOff padOldX padOldY padOn padPassThroughHandshaking padPassThroughOff padPassThroughOn padPassThroughResetCodes padPassThroughSetOffCode padPassThroughSetOnCode padPortReclaim padPortRelease padPromptHexNumber padPromptNum padPromptNumber padPromptReset padPromptSignature padPromptString padPromptTimeout padPutBits padPutBmpFile padPutLogo padPutText padReadByte padRecord padReset padResetArea padResetBaudRate padResetConnectTimeout padResetDefaultBaudRate padResetInTimeout padResetMagCard...
  • Page 14 Function TT1500 TT3100 Series padScaleDPI padScaleTo padScaleX padScaleY padSendByte padSetArea padSetAutoInking padSetBaudRate padSetBkColor padSetColor padSetCompress padSetConnectTimeout padSetDebug padSetDefaultBaudRate padSetFlowControl padSetFont padSetInTimeout padSetInkingArea padSetLcdClearTimeout padSetLogo padSetLogoBmpFile padSetNumVar padSetOutTimeout padSetPadOffset padSetPixel padSetPort padSetPortAddr padSetPortHandle padSetPortIrq padSetPorts padSetScanRate padSetTime padSetType padStop padSoundBell padSoundEnable padSoundSetFreq padSoundTone padToHIENGLISH...
  • Page 15: Library Functions List By Category

    Function TT1500 TT3100 Series padToLOMETRIC padType padUpdate padVertDPI padWidth Library Functions List by Category The following lists the functions in groups of distinct functional categories. For a detailed description of the functions listed, refer to "Library Functions" on page 3-1. Basic Operations: padConnect Attempts a connection to a pad (similar to padOn).
  • Page 16 Error Handling: padError Get the most recent error status. padFlush Flush any data waiting to be processed. padIsError Check if an error has occurred. padIsPadError Check if an error has occurred. padGetPadError Get the error code. padSetDebug Set the debug mode On or Off. LCD Screen Operations: padBox Draws a box onto the LCD screen.
  • Page 17 padLcdHorzDPI Get horizontal resolution of the LCD screen. padLcdVertDPI Get vertical resolution of the LCD screen. padLcdWidth Get width of LCD screen area in pixels. Memory Operations: padMemAvailable Check if memory is available. padMemReset Reset memory. padMemGetFree Get amount of free memory. padMemGetChecksum Perform a checksum of memory.
  • Page 18 padSetPortIrq Sets a COM port’s interrupt number. Port Operations: padGetPort Gets the current communications port. padGetPorts Gets the current number of ports available. padPassThroughHandshaking Enables/disables hardware handshaking (pass through). padSetPort Sets the preferred communications port. padSetPortHandle Sets the port handle. padSetPorts Sets the amount of ports available on the PC.
  • Page 19 padToHIMETRIC Scale to units based on 100ths of a millimeter. padToLOMETRIC Scale to units based on 10ths of a millimeter. Scan Rate Operations: padSetConstant Set a constant scan rate On or Off. padGetConstant Check if constant scan rate is On or Off. padSetScanRate Set a scan rate.
  • Page 20 padGetConnectTimeout Gets the initial connection intput/output timeout value. padGetDefaultBaudRate Returns the current default baud rate. padGetInTimeout Gets the timeout value for input. padGetOutTimeout Gets the timeout value for output. padPassThroughOff Turns off passthorugh mode padPassThroughOn Turns on passthorugh mode padPassThroughResetCodes Resets the passthrough codes padPassThroughSetOffCode Sets the passthrough “ON”...
  • Page 21: Chapter 3 - Library Functions

    Library Functions This section provides detailed information about each library function, arranged in alphabetic order. "Library Reference" on page 2-1 presents a brief overview of these functions based on functional category. padBinaryGetTable Gets data from a table row. Syntax WORD padBinaryGetTable( char FAR * lpszDatabaseName, BYTE FAR * lpuBuffer, WORD wBufSize,...
  • Page 22: Padbox

    padBox Draws a solid box on the LCD screen starting at the coordinates specified by X and Y using the size specified by Width and Height. The box is drawn using the current foreground color. The illustration depicts the placement of an arbitrary box at location x,y with width of W and height H.
  • Page 23: Padcomdate

    See Also padBox, padFrame, padInvert, padLine, padSetPixel PadComDate Returns a pointer to a string containing the date of the build of the PadCom library. The format of the returned string is in ASCII text format including the month, day, and year of the build. For example, “July 16, 1998.” Syntax char * PadComDate() See Also...
  • Page 24: Paddisplayobject

    Syntax BOOL padConnectClearScreen ( BOOL enable Parameter Description enable Flag to enable/disable screen clear on Connect. Returns Returns TRUE if successful, FALSE otherwise. See Also padOn, padOff, padConnect padDisplayObject Draws a memory object onto the position specified by pptAt on the screen, if applicable. An object can be stored in non- volatile memory using padMemLoadText, padMemLoadBitmap or similar commands.
  • Page 25: Padechocomm

    Returns Returns TRUE if the function succeeds, FALSE otherwise. See Also padHideTime, padSetTime, padGetTime, padSetFont padEchoComm Echoes data back to the host (the PC). The user sends a block of data specified by SendDataBlock (with the length of the data specified by DataLength) to the pad and the pad sends the data back to the host which is then placed in RecvDataBlock.
  • Page 26: Padfieldbutton

    padFieldButton Creates a button and displays it on the pad screen. Commands can be executed when the button is pressed and released. Syntax BOOL padFieldButton( WORD wId, WORD wStyle, WORD wLeft, WORD wTop, WORD wWidth, WORD wHeight, BYTE uFont, char FAR *pcText, WORD wTextLen, WORD wCmdPress, char FAR * pcPressArgData,...
  • Page 27: Padfieldsignature

    padFieldSignature Creates a signature field. Syntax BOOL padFieldSignature ( WORD wId, WORD wStyle, WORD wLeft, WORD wTop, WORD wWidth, WORD wHeight, WORD wMaxPoints, WORD wEnterTime, WORD wEnterCmd, char FAR * pcData, int nDataLen Parameter Description Field identification number wStyle Field style attributes. 0 for defaults wLeft X-coordinate of upper point wTop...
  • Page 28: Padformsavefld

    Parameter Description Field identification number See Also padFormSaveFld padFormSaveFld Saves the current signature data to the specified variable. Syntax BOOL padFormSaveFld( WORD wId, char FAR * pcName, WORD wNameLen Parameter Description Field identification number pcName Variable name wNameLen Name length See Also padBox, padClearPixel, padInvert, padLine, padSetPixel padFrame...
  • Page 29: Padget

    padGet Receives new data from the pad by checking for and returning the last horizontal/vertical coordinates and pen status. A pen status of 1 indicates the continuation of a line (lineto(x,y )), whereas a 0 represents the beginning of a stroke (moveto(x,y)). NULL pointers may be passed as any of the parameters to suppress gathering of the associated data.
  • Page 30: Padgetarea

    padGetArea Finds the minimum and maximum coordinates of the active pad area by retrieving the current clipping area into the variables provided. NULL pointers may be passed as any or all parameters. Syntax BOOL padGetArea( int *xLeft, int *yTop, int *xRight, int *yBottom Parameter Description...
  • Page 31: Padgetcmdsetid

    padGetCmdSetID Gets the command set ID number. The command set ID number for a standard Transaction Team 3100 Series is “1234.” The command set ID number is a code that identifies the type of command set used and is not to be confused with the version of the command set.
  • Page 32: Padgetdefaultbaudrate

    3100 Series pads that support VISA standard DUKPT PIN entry prompts. A key must be injected into the unit before this function can be used. Please contact your hardware supplier or Hand Held Products for information on secure key injection.
  • Page 33: Padgetdukpttextpin

    3100 Series pads that support standard DUKPT PIN entry prompts. One DUKPT key must be injected into the unit before this function can be used. Please contact your hardware supplier or Hand Held Products for information on secure key injection.
  • Page 34: Padgetfont

    padGetFont Gets the current text font. Syntax int padGetFont( void Returns Returns the current font number. The FontIDs correspond to the sizes specified in the table below: Available for Font ID Horizontal Size Vertical Size Transaction Team 3100 Series See Also padSetFont, padPutText padGetFontSize This command returns the horizontal and vertical size of the character dimensions used in the specified font.
  • Page 35: Padgetintimeout

    See Also padSetFont, padGetFont padGetInTimeout This function returns the current time-out value used for the com port’s input (in milliseconds) from the connected pad. This is not related to the time-out used during the initial connection phase (see "padSetConnectTimeout" on page 3-52). Syntax unsigned int padGetInTimeout( void...
  • Page 36: Padgetmastersessionbinarypin

    Transaction Team 3100 Series that support standard Master/Session PIN entry prompts. 10 master keys must be injected into the unit before this function can be used. Contact your hardware supplier or Hand Held Products for information on secure key injection.
  • Page 37: Padgetmaxcardtracks

    Parameter Description pTitle Specifies a string to display as the title of the PIN entry screen pAcctNum The user’s account number used to generate the encrypted PIN number pSessionKey The session key used to generate the encrypted PIN number pMasterKeyID Used to identify which of the 10 (0-9) injected master keys to use to generate the encrypted PIN number.
  • Page 38: Padgetmodel

    Returns Returns TRUE upon success, FALSE otherwise. See Also padGetMaxCardTracks, padGetAllMagCardTracks padGetModel Retrieves the model ID. The ID is returned as a 16-bit integer in the WORD pointer Model. For a Transaction Team 3100 Series, the model ID returned is 3100, and for a Transaction Team 1500, the model ID returned is 1500. Syntax BOOL padGetModel( WORD *Model...
  • Page 39: Padgetpage

    padGetPage Retrieves the size and resolution of the Transaction Team POS device's touch sensitive surface. This function retrieves the total number of touch points available on the Transaction Team POS device's touch surface area in the locations pointed to by Width and Height. It retrieves the dots per inch resolution of the Transaction Team POS device's touch surface area in the locations pointed to by HorzDPI and VertDPI.
  • Page 40: Padgetportaddr

    padGetPortAddr Returns the address of a port. Note: This function is available in the MS-DOS version only! Syntax MS-DOS: int padGetPortAddr( int Port Parameter Description Port 1 = COM1 2 = COM2 3 = COM3 4 = COM4 Returns Returns the address of the specified communications port. See Also padSetPortAddr, padGetPortIrq padGetPortIrq...
  • Page 41: Padgetscanrate

    See Also padSetPort, padSetPorts padGetScanRate Gets the current scan rate. Scan rate is used to vary the number of points captured per second. Syntax int padGetScanRate( void Returns Returns the current scan rate if succeeds, FALSE if function fails See Also padSetScanRate padGetTableItem Transfers data from a table row to a variable.
  • Page 42: Padgetversion

    Returns Returns TRUE upon success, FALSE otherwise. See Also padDisplayTime, padSetTime, padHideTime padGetVersion Retrieves the model revision number of the firmware. The revision number is returned in the following format: HIBYTE Major revision number as binary value LOBYTE Minor revision number as binary value This command allows a user to check the version number of the firmware (ROM chips in the pad).
  • Page 43: Padhorzdpi

    Returns Returns TRUE upon success, FALSE otherwise. See Also PadDisplayTime, padGetTime, padSetTime padHorzDPI Syntax int padHorzDPI( void Returns Returns the number of horizontal points per inch. See Also padWidth, padVertDPI padInkExport Converts the raw signature data into given format. 01 - INK_POINTS 02 - INK_TOKEN 05 - INK_PACKET 07 - INK_COTF...
  • Page 44: Padinvert

    padInvert Inverts an area on the LCD screen by turning all black pixels white and all white pixels black. The area to be inverted is defined by the coordinates specified by X and Y, using the size specified by Width and Height. Syntax BOOL padInvert( int X,...
  • Page 45: Padislcd

    Returns Returns TRUE upon success, FALSE otherwise. padIsLcd Syntax BOOL padIsLcd( void Returns Returns TRUE if an LCD screen is available, FALSE otherwise. See Also padClear, padPutText, padPutBits padIsNewStroke Checks if the last X,Y coordinate received is the start of a new pen stroke. Note that the status is only updated when padUpdate returns TRUE to indicate new data received.
  • Page 46: Padisrecord

    Returns Returns TRUE if the pen is down, FALSE otherwise. See Also padUpdate, padRecord, padGet, padIsNewStroke padIsRecord Syntax BOOL padIsRecord( void Returns Returns TRUE if the pad is currently sending data, FALSE otherwise. See Also padRecord, padStop, padIsOn padLcdHeight Syntax int padLcdHeight( void Returns...
  • Page 47: Padlcdvertdpi

    padLcdVertDPI Syntax int padLcdVertDPI( void Returns Returns the number of vertical points per inch of the LCD. See Also padIsLcd, padLcdHeight, padLcdHorzDPI padLcdWidth Syntax int padLcdWidth( void Returns Returns the total number of horizontal points on the LCD. See Also padIsLcd, padLcdHeight, padLcdHorzDPI padLightOff Sends commands to the pad to turn off the red light.
  • Page 48: Padline

    padLine Draws a straight line on the screen starting at the location specified by X and Y, and ending at the location specified by Xto and Yto. The line is drawn using the current foreground color. The illustration depicts an arbitrary line drawn from a starting point x,y to xTo,yTo.
  • Page 49: Padmemdelete

    padMemDelete Deletes the specified item from the non-volatile memory if it exists. Syntax BOOL padMemDelete( WORD Id Parameter Description ID of the memory item to be deleted Note: All memory objects may be deleted, even empty ones. To check if a specified memory object contains data, use padMemFind (see page 3-29).
  • Page 50: Padmemgetchecksum

    See Also padMemReset, padMemClear, padMemDelete, padMemLoadText, padMemLoadBitmap, padMemFind, padMemGetChecksum. padMemGetChecksum Checksum is a pointer to a WORD data type that stores the checksum of all stored items. This is used to verify that memory contents have not been changed since the last call to padMemGetChecksum. Syntax BOOL padMemGetChecksum( WORD *Checksum...
  • Page 51: Padmemloadbitmap

    Parameter Description pcName Variable name containing the data wNameLen Name length pcData Pointer to a buffer where retrieved data is placed pwDataLen Buffer length Returns Returns TRUE if the function succeeds, FALSE otherwise. See Also padMemSetVar, padFormSaveFld padMemLoadBitmap Loads a raw unformatted bitmap into the non-volatile memory with the given Id. This function overwrites any item already assigned to Id.
  • Page 52: Padmemloadtext

    Syntax BOOL padMemLoadBitmapFile( WORD Id, char *FileName Parameter Description ID of the memory item FileName The name of the black and white BMP file to load Returns Returns TRUE if the function succeeds, FALSE otherwise. See Also padMemReset, padMemClear, padMemDelete, padMemFind, padMemLoadText, padMemGetFree, padMemGetChecksum, padPutBits, padPutBmpFile, padDisplayObject, padMemLoadBitmap padMemLoadText Loads an ASCII text string into the non-volatile memory with the given Id.
  • Page 53: Padmemsetvar

    See Also padMemGetFree, padMemClear, padMemDelete, padMemLoadText, padMemLoadBitmap, padMemFind, padMemGetChecksum padMemSetVar Sets the specified varible with the data retrived by executing the given command. Syntax BOOL padMemSetVar( char FAR * pcVarName, WORD wNameLen, WORD wCmd, char FAR *pcCmdData, WORD wDataLen Parameter Description pcVarName Variable name to which to save the data...
  • Page 54: Padnewy

    See Also padGet, padOldX, padNewY padNewY Syntax int padNewY( void Returns Returns the most recent vertical coordinate received. See Also padGet, padOldY, padNewX padOff Stops any recording, turns off the pad and closes communication channels. The port is closed at the baud rate of the initial connection.
  • Page 55: Padon

    Returns Returns the previous vertical coordinate received. See Also padOldX, padNewY padOn Checks for the existence of a pad and initializes communications. Normally this command searches all valid COM-ports for the existence of all supported Transaction Team pad types. This command must be executed before using the library; the only exceptions to this are the commands padSetPort, padSetPortAddr, padSetPortIrq, and padSetType, which modify the behavior of padOn and must be called prior to calling padOn.
  • Page 56: Padpassthroughon

    See padPassThroughSetOffCode and padPassThroughResetCodes for more information on using the correct code for turning off pass through mode. To enable pass through mode use padPassThroughOn. Syntax WORD padPassThroughOff( char *code, WORD codeLength Parameter Description code A buffer containing the binary code used to turn off pass through mode codeLength The length of the binary pass through code in bytes Returns...
  • Page 57: Padpassthroughresetcodes

    padPassThroughResetCodes This command resets the pass through “ON” and “OFF” codes to the factory defaults. The default codes are two bytes in length. The default “ON” code is AA 55 in hexadecimal (170 85 in decimal). The default “OFF” code is 55 AA in hexadecimal (85 170 in decimal).
  • Page 58: Padportreclaim

    NOTE: You cannot use this command to set the “ON” code of a pad that is currently in pass through mode. If a pad is in pass through mode it will ignore this command and send it to its pass through port. Syntax WORD padPassThroughSetOnCode( char *code,...
  • Page 59: Padprompthexnumber

    padPromptHexNumber Displays a hexadecimal keypad and returns the entered hexadecimal number. The user is prompted to enter a hexadecimal value. The prompt includes “ENTER”, “CLEAR”, ”C”, “UNDO”, and “CANCEL” buttons. “ENTER” accepts the numeric entry. “CLEAR” and “C” both clear the numeric entry. “UNDO” removes the last digit entered.
  • Page 60: Padpromptnumber

    padPromptNumber Displays a numeric keypad and returns the entered number. The user is prompted to enter a numeric value. The prompt includes “ENTER”, “CLEAR”, ”C”, “UNDO”, and “CANCEL” buttons. “ENTER” accepts the numeric entry. “CLEAR” and “C” both clear the numeric entry. “UNDO” removes the last numeric digit entered. “CANCEL”...
  • Page 61: Padpromptsignature

    The data is returned in a special Transaction Team signature data packet. This packets needs to be post-processed to extract the signature data from the buffer. Please contact Hand Held Products for more information on extracting the signature data returned from this command.
  • Page 62: Padprompttimeout

    See Also padPromptHexNumber, padPromptNum, padPromptNumber, padPromptReset, padPromptSignature, padPromptTimeout padPromptTimeout This command is used to set the maximum amount of time a prompt (such as padPromptSignature) will remain on the display. The default is 600 seconds (10 minutes). After the specified amount of time elapses, the prompt is removed from the screen.
  • Page 63: Padputlogo

    Note: This command accepts a Windows bitmap (BMP) file. It does not accept raw unformatted bitmap data. Syntax BOOL padPutBmpFile( int X, int Y, const char *FileName Parameter Description Horizontal coordinate to place the bitmap Vertical coordinate to place the bitmap FileName Name of Windows bitmap file Returns...
  • Page 64: Padreadbyte

    padReadByte This command retrieves a single byte from the pad. This command can be used when the pad is in pass through mode to retrieve data from a device connected to the pass through port of the pad (if available). Using padSetInTimeout (see page 3-55) you can control how long this command will wait for the byte to be retrieved.
  • Page 65: Padresetarea

    Syntax BOOL padReset( void Returns Returns TRUE upon success, FALSE otherwise. See Also padResetArea, padStop, padOff padResetArea Resets the minimum and maximum coordinates of the active pad area. This command is used to undo padSetArea (see page 3-49). It restores the usable area of the pad to the full pad surface. Syntax void padResetArea( void...
  • Page 66: Padresetdefaultbaudrate

    See Also padSetOutTimout, padGetInTimeout, padGetOutTimeout, padSetInTimeout, padResetOutTimeout, padSetConnectTimeout, padGetConnectTimeout padResetDefaultBaudRate Sets the default communications baud rate to the initial baud rate of 9600. See "padSetDefaultBaudRate" on page 3-52 for more information. Syntax BOOL padResetDefaultBaudRate( void Returns Returns TRUE if successful, FALSE otherwise. See Also padSetBaudRate, padGetBaudRate, padSetDefaultBaudRate, padGetDefaultBaudRate, padResetBaudRate padResetInTimeout...
  • Page 67: Padresetouttimeout

    padResetOutTimeout This function resets the time-out value used for the com port’s output to the connected pad. This is not related to the time- out used during the initial connection phase (see "padSetConnectTimeout" on page 3-52). Syntax unsigned int padResetOutTimeout( void Returns Returns the default time-out setting...
  • Page 68: Padscaleto

    Parameter Description Pointer to an integer to hold the horizontal coordinate to be scaled Pointer to an integer to hold the vertical coordinate to be scaled HorzDPI The horizontal dots-per-inch resolution desired VertDPI The vertical dots-per-inch resolution desired See Also padScaleTo, padScaleX, padScaleY padScaleTo Scales horizontal and vertical pad coordinates based on a desired frame size.
  • Page 69: Padscaley

    padScaleY Scales a vertical pad coordinate to a desired DPI resolution. This function is designed to provide proper aspect ratio scaling for accurate output. Syntax int padScaleY( int Y, int VertDPI ) Parameter Description An integer specifying the vertical coordinate to be scaled VertDPI The vertical dots-per-inch resolution of the horizontal coordinate Returns...
  • Page 70: Padsetautoinking

    Note: The padRecord (see page 3-44) function must be called before points are retrieved from the Transaction Team POS device's touch sensitive surface. Syntax void padSetArea( int xLeft, int yTop, int xRight, int yBottom Parameter Description xLeft Minimum horizontal coordinate yTop Minimum vertical coordinate xRight...
  • Page 71: Padsetbkcolor

    Parameter Description BaudRate The baud rate for a communications link attempt Returns Returns the new baud rate if successful, FALSE otherwise. See Also padConnect, padGetBaudRate, padResetBaudRate, padOn padSetBkColor Sets the current background color. This value is either 1 or 0. Syntax BOOL padSetBkColor( int Color...
  • Page 72: Padsetconnecttimeout

    Syntax BOOL padSetCompress( BOOL Compress Parameter Description Compress TRUE to enable compressed capture mode FALSE to collect uncompressed data points Returns Returns TRUE if successful, FALSE otherwise. padSetConnectTimeout This function sets the time-out value (in milliseconds) used for the com port during the initial connection phase. After establishing a connection, use padSetInTimeout and padSetOutTimeout (see page 3-55) to control the time-out settings of the com port.
  • Page 73: Padsetflowcontrol

    all com ports for all possible Transaction Team devices using all possible baud rates, starting with the default of 9600 baud. If a Transaction Team 3100 Series is connected to com port 2 and is configured to communicate at 57600 baud, first PadCom searches port 1 at the default baud rate for both the TT1500 and TT3100 Series (9600).
  • Page 74: Padsetinkingarea

    Available fonts: Available for Horizontal Vertical Font Id Transaction Team 3100 Size Size Series Returns Returns the previously selected font. See Also padGetFont, padPutText padSetInkingArea If auto inking is disabled for the entire surface of the pad (see padSetAutoInking) this function allows you to specify an area of the LCD where auto inking will occur.
  • Page 75: Padsetintimeout

    padSetInTimeout This function sets the time-out value in milliseconds used for the com port’s input from the connected pad. This is not related to the time-out used during the initial connection phase (see "padSetConnectTimeout" on page 3-52). Syntax unsigned int padSetInTimeout( unsigned int newTimeout Returns Returns the old time-out setting.
  • Page 76: Padsetlogo

    padSetLogo Sets the LCD screen logo to the contents of the bitmap image Bits. The logo is not actually displayed until padPutLogo is called. To reset the logo to the default image, use NULL as the Bits parameter. The logo must have 240 pixels across and 128 pixels down.
  • Page 77: Padsetnumvar

    padSetNumVar Sets a variable with given numeric data. Syntax BOOL padSetNumVar( char FAR *lpszVarName, WORD wValue Parameter Description lpszVarName Name of the variable to which the numeric value is assigned wValue Value Returns Returns TRUE if successful, FALSE otherwise. See Also padGetNumVar padSetPadMode Sets the Transaction Team 1500’s operational mode.
  • Page 78: Padsetpadoffset

    padSetPadOffset This command sets the offset value of the If the touch surface area has a resolution of 1024x1024 with a DPI of 273x455: horizontal and vertical points retrieved from the Transaction Team device’s touch surface area when mapping the device’s smaller surface area to a larger surface area when in To map the TT1500’s touch The TT1500’s touch surface...
  • Page 79: Padsetport

    See Also padBox, padClearPixel, padFrame, padInvert, padLine padSetPort Sets the communications port. The next time padOn is executed, only the com port specified by Port is used. This function works only when the library is in an “off” state (i.e., before padOn() or after padOff()). This is not normally needed, however it may be useful in some situations.
  • Page 80: Padsetporthandle

    padSetPortHandle Sets a handle to the port. Syntax Win32: void padSetPortHandle( Win16: void padSetPortHandle( HANDLE newPortHandle int newPortHandle Parameter Description newPortHandle Handle to the port See Also padSetPort, padSetPortIrq, padSetType padSetPortIrq Sometimes it may be necessary to manually specify the interrupt request numbers used when referring to a communications port.
  • Page 81: Padsetscanrate

    Returns Returns the previous number of ports used. See Also padGetPort, padGetPorts, padIsOn, padSetPortAddr, padSetPortIrq, padSetType padSetScanRate Sets the current scan rate, specified by ScanRate. Values can be set from 26 to 199. Scan rate changes the number of signature points scanned per second. Syntax BOOL padSetScanRate( int ScanRate...
  • Page 82: Padsoundbell

    Syntax BOOL padSetType ( int Type Parameter Description Type Used to specify the type of Transaction Team pad Returns Returns TRUE if the type of pad specified is valid and FALSE otherwise. See Also padOn, padSetPort, padSetPortAddr, padSetPortIrq padSoundBell This command allows you to play various different types of preset sounds stored in the Transaction Team 3100 Series devices.
  • Page 83: Padsoundsetfreq

    padSoundSetFreq This command allows the user to set the internal speaker to play a frequency specified by the value in Freq. Setting the frequency to zero turns off the sound. Syntax BOOL padSoundSetFreq( WORD Freq Parameter Description Freq The frequency value for the speaker Returns Returns TRUE upon success, FALSE otherwise.
  • Page 84: Padstop

    Parameter Description Freq The frequency value for the speaker Duration The amount of time to play the sound frequency Returns Returns TRUE upon success, FALSE otherwise. See Also padSoundBell, padSoundSetFreq, padSoundEnable padStop Stop receiving data from the pad. This function turns off real-time recording initiated with padRecord (see page 3-44), and sends commands to the pad to stop transmitting pad activities.
  • Page 85: Padtohimetric

    Parameter Description Pointer to an integer to hold the horizontal coordinate to be scaled Pointer to an integer to hold the vertical coordinate to be scaled See Also padToHIENGLISH, padToLOMETRIC, padToHIMETRIC padToHIMETRIC This function scales horizontal and vertical pad coordinates to units representing 0.01 millimeters. It is designed to provide proper aspect ratio scaling for accurate output, and converts the values pointed to by X and Y pointers.
  • Page 86: Padupdate

    Syntax enum padTypes padType( void See Also padName padUpdate This function checks for and receives new data from the pad. It receives data packets from the pad and decodes them into meaningful information. All information received is stored until the next time this function is executed. Use functions such as padGet (see page 3-9) and padIsPenDown (see page 3-25) to access the information received.
  • Page 87: Chapter 4 - Supported Bitmap Format

    Supported Bitmap Format Many PadCom commands such as padPutBmpFile and padSetLogoBmpFile accept Windows style bitmap files. Other command such as padPutBits and padMemLoadBitmap do not. These commands accept raw black and white bitmap data. The raw black and white bitmap format used throughout PadCom is the standard raw bitmap format used for black and white bit mapped images.
  • Page 88 4 - 2...
  • Page 89: Chapter 5 - Sample Source Code

    //Microsoft Visual C++ 1.52 //Target: DOS Application //Memory Model: Medium //Include:..\..\..\padcom.h //Library:..\libs\padcomdm.lib //Environment: //DOS 3.3 or better // Copyright (c) Hand Held Products. All rights reserved. //=-------------------------------------------------------------------------- #include <graph.h> #include <conio.h> #include "PadCom.h" int GraphOn( void ); void GraphOff( void );...
  • Page 90 // TURN PAD ON-INITIALIZE //======================= if( !padOn() ) cputs( "Can't find writing pad!" ); return; //======================== // SWITCH TO GRAPHICS MODE //======================== if( !GraphOn() ) cputs( "Unable to use graphics" ); padOff(); return; //========================== // START REAL TIME RECORDING //========================== padRecord();...
  • Page 91: Padcom Signature Capture Sample For Windows 3.X

    _moveto( x, y ); //=================== // RESTORE VIDEO MODE //=================== GraphOff(); //===================== // TURN PAD OFF-CLEANUP //===================== padOff(); int GraphOn( void ) char Msg[] = "PLEASE SIGN ON THE PAD, PRESS ANY KEY WHEN DONE"; if( !_setvideomode( _MAXRESMODE ) ) return 0;...
  • Page 92 //Microsoft Visual C++ 1.52 //Target: Windows Application //Memory Model: Medium //Include:..\..\..\padcom.h //Library:..\libs\padcomwm.lib //Environment: //Windows 3.x //Copyright (c) Hand Held Products. All rights reserved. //=-------------------------------------------------------------------------- #include "windows.h" #include "PadCom.h" intPASCALWinMain( HINSTANCE, HINSTANCE, LPSTR, int ); LONG __export CALLBACKWndProc( HWND, UINT, WPARAM, LPARAM ); HINSTANCEtheInstance;...
  • Page 93 wc.lpszMenuName= NULL; wc.lpszClassName= "TESTAPP"; wc.hInstance= hInst; wc.hIcon= NULL; wc.hCursor = NULL; wc.hbrBackground= (HBRUSH)COLOR_WINDOW + 1; wc.style= 0; wc.lpfnWndProc= WndProc; wc.cbClsExtra= 0; wc.cbWndExtra= 0; if( !RegisterClass( &wc ) ) return 0; // Create the main window if( !(theWnd = CreateWindowEx( WS_EX_TOPMOST, "TESTAPP", "SIGN YOUR NAME THEN PRESS ANY BUTTON", WS_OVERLAPPED | WS_SYSMENU, CW_USEDEFAULT, CW_USEDEFAULT, 375, 225, NULL, NULL, hInst, NULL )) return 0;...
  • Page 94 // --------------------------------------------------------------------------- LONG __export CALLBACK WndProc( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam switch( Msg ) case WM_CREATE: // Turn on the writing pad if( padOn() ) // Start recording... padRecord( hWnd ); else // Error MessageBox( hWnd, "Unable to find writing pad", "TESTAPP", MB_OK ); PostQuitMessage( 1 );...
  • Page 95 // Setup DC to perform scaling based on client rect hDC = GetDC( hWnd ); GetClientRect( hWnd, &Rect ); SetMapMode( hDC, MM_ANISOTROPIC ); SetWindowExt( hDC, padWidth(), padHeight() ); SetViewportExt( hDC, Rect.right, Rect.bottom ); // If not first point of new stroke, draw stroke if( p ) MoveTo( hDC, padOldX(), padOldY() );...
  • Page 96: Padcom Signature Capture Sample For Windows95/Nt

    //Microsoft Visual C++ 4.0 //Target: Windows Application //Include:..\..\..\padcom.h //Library:..\libs\padcomw.lib //Environment: //Windows 95/NT // Copyright (c) Hand Held Products. All rights reserved. //=-------------------------------------------------------------------------- #include <windows.h> #include "PadCom.h" // USER DEFINED PADCOM MESSAGE #define WM_PADNOTIFYWM_USER + 100 int CALLBACK WinMain( HINSTANCE, HINSTANCE, LPSTR, int );...
  • Page 97 // --------------------------------------------------------------------------- // WinMain // --------------------------------------------------------------------------- int CALLBACK WinMain( HINSTANCE hInst, HINSTANCE hInstPrev, LPSTR lpstrCmdLine, int cmdShow MSG msg; WNDCLASS wc; theInstance = hInst; // Register the window class if this is the first instance. if( !hInstPrev ) wc.lpszMenuName= NULL; wc.lpszClassName= "TEST";...
  • Page 98 // Show main window ShowWindow( theWnd, cmdShow ); UpdateWindow( theWnd ); // Main message loop while( GetMessage( (LPMSG)&msg, NULL, 0, 0 ) ) TranslateMessage( (LPMSG)&msg ); DispatchMessage( (LPMSG)&msg ); return 0; // --------------------------------------------------------------------------- // WndProc // --------------------------------------------------------------------------- LONG CALLBACK WndProc( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam switch( Msg ) case WM_CREATE:...
  • Page 99 break; case WM_PADNOTIFY: // Check for any new data received while( padUpdate() ) int x, y, p; // If pen is down, get pen position info and draw it if( padGet( &x, &y, &p ) ) RECT Rect; HDC hDC; // Setup DC to perform scaling based on client rect hDC = GetDC( hWnd );...
  • Page 100: Padcom Sample Source Code For The Magnetic Stripe Reader (Msr)

    NOT a part of the SDK installation. There are numerous ways to capture MSR from Transaction Team devices and the demo code simply shows one of these. Hand Held Products does not necessarily claim that this is the best way to read MSR data.
  • Page 101 // ** // ** Compiler: Microsoft Visual C++ 1.52 // ** // ** // ** // ** (C) Copyright 1999-2000 Hand Held Products. // ** // ******************************************************************************** // ******************************************************************************** // ******************************************************************************** // * // * Required header files // * // ******************************************************************************** #include <stdio.h>...
  • Page 102 #define TRACK1_MAX (74+1) #define TRACK2_MAX (39+1) #define TRACK3_MAX (106+1) // ******************************************************************************** // * // * main - the application entry point // * // ******************************************************************************** void main ( void ) char track1 [TRACK1_MAX], track2 [TRACK2_MAX], track3 [TRACK3_MAX]; dataReadFromTrack1 = 0, dataReadFromTrack2 = 0, dataReadFromTrack3 = 0;...
  • Page 103 printf ( "(Press ESC to cancel)\n\n" ); // ******************************************************* // * Step 2: prepare the MSR to read data. // ******************************************************* if ( !padGetMagTrack ( 0,0,0 ) ) printf ( "ERROR: No Magnetic Stripe Reader found\n\n" ); printf ( "\n\nPress any key\n" ); while ( !kbhit () );...
  • Page 104 // ******************************************************* // * Step 3: Check if any of the tracks were read. // ******************************************************* dataReadFromTrack1 = padGetMagTrack ( 1, track1, TRACK1_MAX ); dataReadFromTrack2 = padGetMagTrack ( 2, track2, TRACK2_MAX ); dataReadFromTrack3 = padGetMagTrack ( 3, track3, TRACK3_MAX ); dataReadFromTrack1 || dataReadFromTrack2 || dataReadFromTrack3...
  • Page 105: Padcom Msr Sample Code For Win 3.X

    // print out the results printf ( "Data received from Magnetic Card:\n\n"); printf ( "Track 1 size: %d\n", dataReadFromTrack1 ); printf ( "Track 1 data: %s\n\n", track1 ); printf ( "Track 2 size: %d\n", dataReadFromTrack2 ); printf ( "Track 2 data: %s\n\n", track2 ); printf ( "Track 3 size: %d\n", dataReadFromTrack3 );...
  • Page 106 // ** // ** // ** (C) Copyright 1999-2000 Hand Held Products. // ** // ******************************************************************************** // ******************************************************************************** // ******************************************************************************** // * // * Required header files // * // ******************************************************************************** #include <windows.h> #include <string.h> #include <stdio.h> #include "PadCom.H" // ********************************************************************************...
  • Page 107 #define TRACK1_MAX (74+1) #define TRACK2_MAX (39+1) #define TRACK3_MAX (106+1) #define MSR_TIMER_ID 1 #define MSR_DATA_READ1 // ******************************************************************************** // * // * Function prototypes // * // ******************************************************************************** PASCAL WinMain ( HINSTANCE,HINSTANCE, LPSTR, int ); LONG __export CALLBACKWndProc ( HWND, UINT, WPARAM, LPARAM ); void CALLBACK TimerProc ( HWND, UINT, UINT, DWORD );...
  • Page 108 char track1 [TRACK1_MAX], track2 [TRACK2_MAX], track3 [TRACK3_MAX]; dataReadFromTrack1 = 0, dataReadFromTrack2 = 0, dataReadFromTrack3 = 0; // ******************************************************************************** // * // * WinMain - the application entry point // * // ******************************************************************************** int PASCAL WinMain HINSTANCEhInst, HINSTANCEhInstPrev, LPSTR lpstrCmdLine, cmdShow msg;...
  • Page 109 wc.lpszClassName= appName; wc.hInstance = hInst; wc.hIcon = NULL; wc.hCursor = NULL; wc.hbrBackground= (HBRUSH)COLOR_WINDOW + 1; wc.style = 0; wc.lpfnWndProc = WndProc; wc.cbClsExtra = 0; wc.cbWndExtra = 0; if( !RegisterClass( &wc ) ) return 0; // Attemp to create the main window theWnd =CreateWindowEx WS_EX_TOPMOST, appName, appTitle, WS_OVERLAPPED | WS_SYSMENU, CW_USEDEFAULT, CW_USEDEFAULT, 375, 225,NULL, NULL,hInst, NULL...
  • Page 110 UpdateWindow( theWnd ); // Proccess the main message loop while( GetMessage( (LPMSG) &msg, NULL, 0, 0 ) ) TranslateMessage( (LPMSG) &msg ); DispatchMessage( (LPMSG) &msg ); return 0; // ******************************************************************************** // * // * WndProc - Message handler for the application // * // ******************************************************************************** LONG __export CALLBACK WndProc(...
  • Page 111 // * Step 1: Turn on the Transaction Team device using padConnect.* // ******************************************************* if( padConnect() ) if ( !ResetMSR ( hWnd ) ) PostQuitMessage( 1 ); else // Error MessageBox( hWnd, "ERROR: No Transaction Team device found!", appName, MB_OK ); PostQuitMessage( 1 );...
  • Page 112 "Track 1 data: %s\n\n" "Track 2 size: %d\n" "Track 2 data: %s\n\n" "Track 3 size: %d\n" "Track 3 data: %s\n\n", dataReadFromTrack1, track1, dataReadFromTrack2, track2, dataReadFromTrack3, track3 MessageBox( hWnd, msrData, "MSR.EXE - Data received from the Magnetic Card", MB_OK ); // Reset if ( !ResetMSR ( hWnd ) ) PostQuitMessage( 1 );...
  • Page 113 PostQuitMessage( 0 ); break; case WM_CHAR: DestroyWindow( hWnd ); break; default: return DefWindowProc( hWnd, Msg, wParam, lParam ); return 0; // ******************************************************************************** // * // * TimerProc - Message handler for timer used to read the MSR // * // ******************************************************************************** void CALLBACK TimerProc( HWND hWnd, UINT Msg, UINT idTime, DWORD dwTime ) KillTimer ( hWnd, idTime );...
  • Page 114 case WM_TIMER: switch ( idTime ) case MSR_TIMER_ID: if ( ReadMSR () ) PostMessage ( hWnd, WM_COMMAND, MSR_DATA_READ, 0 ); return; SetTimer(hWnd, MSR_TIMER_ID, 1000, lpfnMyTimerProc); // ******************************************************************************** // * // * ResetMSR - initializes the MSR and sets up a timer to pole for MSR data // * // ******************************************************************************** int ResetMSR ( HWND hWnd )
  • Page 115 // Initialize the contents of the buffers. strcpy ( track1, "NO DATA READ" ); strcpy ( track2, "NO DATA READ" ); strcpy ( track3, "NO DATA READ" ); // In Windows it is not good to use "do" or "while" loops. // Instead we will use a timer to pole the MSR for data lpfnMyTimerProc = (TIMERPROC) MakeProcInstance( (FARPROC) TimerProc, theInstance );...
  • Page 116 // ******************************************************* // * Step 3: Check if any of the tracks were read. // ******************************************************* dataReadFromTrack1 = padGetMagTrack ( 1, track1, TRACK1_MAX ); dataReadFromTrack2 = padGetMagTrack ( 2, track2, TRACK2_MAX ); dataReadFromTrack3 = padGetMagTrack ( 3, track3, TRACK3_MAX ); dataReadFromTrack1 || dataReadFromTrack2 || dataReadFromTrack3...
  • Page 117: Padcom Msr Sample Code For Win 95/Nt

    // ** Platform: Windows 95/NT // ** // ** Compiler: Microsoft Visual C++ 4.0 // ** // ** // ** // ** (C) Copyright 1999-2000 Hand Held Products. // ** // ******************************************************************************** // ******************************************************************************** // ******************************************************************************** // * 5 - 29...
  • Page 118 // * Required header files // * // ******************************************************************************** #include <windows.h> #include <string.h> #include <stdio.h> #include "PadCom.H" // ******************************************************************************** // * // * Constant values // * // ******************************************************************************** // Transaction Team’ magnetic stripe reader follows the MEGTEK standard. // This standard has the following track sizes defined. // We add 1 to include the appended NULL character at the end of each track.
  • Page 119 // * // ******************************************************************************** WINAPI WinMain ( HINSTANCE,HINSTANCE, LPSTR, int ); LRESULT WndProc ( HWND,UINT, WPARAM, LPARAM ); void CALLBACK TimerProc ( HWND, UINT, UINT, DWORD ); ReadMSR ( void ); ResetMSR( HWND ); // ******************************************************************************** // * // * Global variables // * // ******************************************************************************** HINSTANCE...
  • Page 120 // * WinMain - the application entry point // * // ******************************************************************************** int WINAPI WinMain HINSTANCEhInst, HINSTANCEhInstPrev, LPSTR lpstrCmdLine, cmdShow msg; WNDCLASSwc; theInstance= hInst; // Register the window class if this is the first instance. if( !hInstPrev ) wc.lpszMenuName= NULL; wc.lpszClassName= appName;...
  • Page 121 // Attemp to create the main window theWnd =CreateWindowEx WS_EX_TOPMOST, appName, appTitle, WS_OVERLAPPED | WS_SYSMENU, CW_USEDEFAULT, CW_USEDEFAULT, 375, 225,NULL, NULL,hInst, NULL // If the window was not created then quit if ( !theWnd ) return 0; // Show the main window ShowWindow( theWnd, cmdShow );...
  • Page 122 // ******************************************************************************** // * // * WndProc - Message handler for the application // * // ******************************************************************************** LRESULT WndProc( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam char msrData [1024]; switch( Msg ) case WM_CREATE: // ******************************************************* // * Step 1: Turn on the Transaction Team device using padConnect.* // ******************************************************* if( padConnect() ) if ( !ResetMSR ( hWnd ) )
  • Page 123 // Error MessageBox( hWnd, "ERROR: No Transaction Team device found!", appName, MB_OK ); PostQuitMessage( 1 ); break; case WM_COMMAND: switch ( wParam ) case MSR_DATA_READ: // Display the data read from the Magnetic Stripe Reader sprintf msrData, "Track 1 size: %d\n" "Track 1 data: %s\n\n"...
  • Page 124 MessageBox( hWnd, msrData, "MSR.EXE - Data received from the Magnetic Card", MB_OK ); // Reset if ( !ResetMSR ( hWnd ) ) PostQuitMessage( 1 ); break; case WM_DESTROY: // Turn of the Transaction Team device padOff(); PostQuitMessage( 0 ); break; case WM_CHAR: DestroyWindow( hWnd );...
  • Page 125 default: return DefWindowProc( hWnd, Msg, wParam, lParam ); return 0; // ******************************************************************************** // * // * TimerProc - Message handler for timer used to read the MSR // * // ******************************************************************************** void CALLBACK TimerProc( HWND hWnd, UINT Msg, UINT idTime, DWORD dwTime ) KillTimer ( hWnd, idTime );...
  • Page 126 SetTimer(hWnd, MSR_TIMER_ID, 1000, lpfnMyTimerProc); // ******************************************************************************** // * // * ResetMSR - initializes the MSR and sets up a timer to pole for MSR data // * // ******************************************************************************** int ResetMSR ( HWND hWnd ) // ******************************************************* // * Step 2: prepare the MSR to read data. // ******************************************************* if ( padGetMagTrack ( 0,0,0 ) ) // Initialize the contents of the buffers.
  • Page 127 theInstance ); SetTimer(hWnd, MSR_TIMER_ID, 1000, lpfnMyTimerProc); return 1; MessageBox( hWnd, "ERROR: Unable to initialize Magnetic Stripe Reader!", appName, MB_OK ); return 0; int ReadMSR ( void ) // ******************************************************* // * Step 3: Check if any of the tracks were read. // ******************************************************* dataReadFromTrack1 = padGetMagTrack ( 1, track1, TRACK1_MAX );...
  • Page 128 // It is possible one or more of the other tracks were // checked before any data was retrieved from the card. // As soon as one track contains data all of the other // tracks will as well. // To make sure we get all of the data from all of the tracks // we will read all of them again.
  • Page 132 4619 Jordan Road P.O. Box 187 Skaneateles Falls, New York 13153-0187 ™ PadCom/UG Rev A...

This manual is also suitable for:

Padcom tt3100 series

Table of Contents