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.
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...
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.
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.
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.
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.
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...
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”...
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,...
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.
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...
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.
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.
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,...
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...
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...
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.
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...
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.
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.
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.
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.
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...
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.
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.
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...
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.
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...
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.
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).
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...
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,...
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.
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...
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.
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.
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).
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...
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.
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.
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...
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.
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.
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...
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).
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,...
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.
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”...
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.
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.
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...
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.
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...
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...
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...
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.
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...
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...
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...
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.
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).
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.
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.
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.
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.
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...
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.
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.
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...
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.
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.
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.
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.
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.
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.
//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();...
_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 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() );...
//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 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 );...
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 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...
// ** 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 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 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...