Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeEnglishEspañolContact

The text of a manual · part 1 of 2

Windows DLL Functions for Developers of TimeWand I and DuraWand Applications (Windows 95/98/NT), pages 1 to 6

Pages 1 to 6 of 11

The original document is the PDF (39 KB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the Videx DuraWand Scanner and Videx TimeWand I

Page 1

Windows DLL Functions for Developers of TimeWand I and DuraWand Applications (Windows 95/98/NT) GCO# 1120

Introduction: Videx provides software tools that enable developers and programmers to seamlessly integrate TimeWand I/DuraWand communications capabilities with applications software. One of these tools is DLOAD32.DLL. DLOAD32.DLL is a 32-bit library of functions that enable Windows applications to retrieve data from the TimeWand I or DuraWand. These functions are compatible with Windows development tools that are capable of calling DLLs. The DLOAD32.DLL functions are documented below. In order to use DLOAD32.DLL, the developer must understand DLLs and how to call DLL functions. Videx provides documentation on the DLOAD32.DLL functions only. The developer must know how to call DLL functions from his/her own Windows development environment. This document contains definitions for each DLOAD32.DLL function or subroutine, illustrating the function return type and parameter types with long to indicate a numeric (long) integer, and str to indicate a string. All of the DLOAD32.DLL functions return a long integer value. Three of the functions contain parameters for technical support. The traceDebug parameter requires knowledge of the actual software and can be useful if you are calling for technical support. The IOdebug parameter will show, in the same file as the traceDebug parameter, all of the data and commands sent to and received from the TimeWand I/DuraWand. This debug data will be written to a file named DEBUG.TXT. There will also be a file written named STATUS.TXT that gives the status of each operation. This file can be overwritten or appended. If a wand did not communicate with the computer, its wand ID will not appear in the status file. As an example, sample declarations and function calls for “Visual Basic” are included at the end of this document.

TimeWand I/DuraWand Windows DLL

1

Page 2

DLL Function Calls: long InitializeWand (long WandID, str symPath, str aplPath, long ComPortNumber, long initTime, long traceDebug, long IOdebug) Initializes a TimeWand I or DuraWand by loading the wand with the specified symbology program file, wand ID, and application file. There must be only one wand in the downloader during initialization. The wand must have been reset (triple beep reset). Parameter WandID symPath aplPath

ComPortNumber InitTime

Description Long integer containing the ID that is to be assigned to the TW1/DW. The value must be a valid long integer less than 999,999,999. String containing the symbology program filename, including the full path (for example: c:\videx\3of9kp.twp). String containing the application filename, including the full path (for example c:\videx\app.txt. If no application is to be loaded in the wand, this parameter is an empty string. Refer to page 7 for information on the contents of this file if loading an application (hierarchy or sequence). Long integer containing the number (1–9) of the desired communication port. Long integer containing the time allowed (in seconds) for the communications software to receive a response from the TW1/DW. If a time of zero (0) seconds is used, the DLL will default to 64 seconds. Once the TW1/DW is placed in the recharger/downloader, it wakes up once each minute, so a value of at least 60 seconds is recommended. The maximum allowed value of an integer is system dependent, but large values serve no real purpose for this function.

traceDebug

Long integer to set a debug flag that will create a file named DEBUG.TXT. This file contains traces of the procedure names that have been called in the DLL. A value of one (1) turns traceDebug on; a value of zero (0) turns traceDebug off. This is helpful for troubleshooting problems with the help of Videx Customer Support.

IOdebug

Long integer to set a debug flag that will create a file named DEBUG.TXT. This file contains a copy of all of the communications the DLL has had with the TW1/DW, from the perspective of the DLL. A value of one (1) turns IOdebug on; a value of zero (0) turns IOdebug off. This is helpful for troubleshooting problems with the help of Videx Customer Support.

Returns: If the initialization is successful, InitializeWand returns zero (0). If there are any errors, InitializeWand returns a negative number. The return values are listed on page 6.

TimeWand I/DuraWand Windows DLL

2

Page 3

long DownLoadWand (long WandID, str DataFileName, long ComPortNumber, long OverWriteData, long MemoryDump, long ClearMemory, long DLtime, long traceDebug, long IOdebug) Transfers data from a wand and appends or overwrites the data to an ASCII text data file (raw scan file format). The wand ID which is used must match the ID with which the wand was initialized. Parameter WandID DataFileName

ComPortNumber OverWriteData

Description Long integer containing the ID that was assigned to this wand. The value must be a valid long integer less than 999,999,999. String containing the name of the ASCII text file in which to store the data from the wand. If the file does not exist, it will be created. If the file already exists, the data will be appended to the end of the file or the file will be overwritten (depending upon the value of the AppendOrWrite flag). Long integer containing the number (1–9) of the desired communications port. Long integer to set a flag to determine whether the output file will be appended or overwritten. With a value of zero (0), the output data file will be appended or created. With a value of one (1), the output data file will be overwritten or created.

MemoryDump

Long integer to set a flag to determine whether to download scanned data or to dump the wand’s memory. With a value of zero (0), the wand will have its scanned data downloaded to the designated file. With a value of one (1), the wand will have its entire data area downloaded to a file named MEMORY.DMP.

ClearMemory

Long integer to set a flag to determine whether to clear the wand’s memory after a successful download. With a value of one (1), the wand’s memory will be cleared after the download is complete. With a value of zero (0), the DLL will not clear the memory of the wand. The wand will not be reset with this selection, and may start “chirping” soon after the DLL completes communications. The user must press the scan button to stop the “chirping.”

DLtime

Long integer containing the time allowed (in seconds) for the DLL to hear back from the requested wand. Once the wand is placed in the recharger/downloader, it will wake up once each minute, so a value of at least 60 seconds is recommended. The maximum allowed value of an integer is system dependent, but large values serve no real purpose for this function.

traceDebug

Long integer to set a debug flag that will create a file DEBUG.TXT. This file contains traces of the procedure names that have been called in the DLL. A value of one (1) turns traceDebug on; a value of zero (0) turns traceDebug off. This is helpful for troubleshooting problems with the help of Videx Customer Support.

IOdebug

Long integer to set a debug flag that will create a file DEBUG.TXT. This file contains a copy of all of the communications the DLL has had with the TW1/DW, from the perspective of the DLL. A value of one (1) turns IOdebug on; a value of zero (0) turns IOdebug off. This is helpful for troubleshooting problems with the help of Videx Customer Support.

Returns: If the download is successful, DownLoadWand returns zero (0). If there are any errors, DownLoadWand returns a negative number. The return values are listed on page 6.

TimeWand I/DuraWand Windows DLL

3

Page 4

long DownLoadWandList (str WandIDlist, str DataFileName, long ComPortNumber, long OverWriteData, long ClearMemory, long DLtime, long traceDebug, long IOdebug) Transfers the data from wands whose IDs are specified in a list. Appends or overwrites the data to an ASCII text data file (raw scan file format). Parameter WandIDlist DataFileName

ComPortNumber OverWriteData

Description String containing the name of the ASCII text file containing the wand IDs to be transferred. The file format is: <wandID><cr/lf>. String containing the name of the ASCII text file in which to store the data from the wands. If the file does not exist, it will be created. If the file already exists, the data will be appended to the end of the file or the file will be overwritten (depending upon the value of the AppendOrWrite flag). Long integer containing the number (1–9) of the desired communications port. Long integer to set a flag to determine whether the output file will be appended or overwritten. With a value of zero (0), the output data file will be appended or created. With a value of one (1), the output data file will be overwritten or created.

ClearMemory

Long integer to set a flag to determine whether to clear the wand’s memory after a successful download. With a value of one (1), the wand’s memory will be cleared after the download is complete. With a value of zero (0), the DLL will not clear the memory of the wand. The wand will not be reset with this selection, and may start “chirping” soon after the DLL completes communications. The user must press the scan button to stop the “chirping.”

DLtime

Long integer containing the time allowed (in seconds) for the DLL to hear back from the requested wands. Once the wand is placed in the recharger/downloader, it will wake up once each minute, so a value of at least 60 seconds is recommended. The maximum allowed value of an integer is system dependent, but large values serve no real purpose for this function. Each time a wand responds, the DLtime value is reset to the original value sent to the DLL. Therefore each wand is given the same amount of time in which to be downloaded.

traceDebug

Long integer to set a debug flag that will create a file DEBUG.TXT. This file contains traces of the procedure names that have been called in the DLL. A value of one (1) turns traceDebug on; a value of zero (0) turns traceDebug off. This is helpful for troubleshooting problems with the help of Videx Customer Support.

IOdebug

Long integer to set a debug flag that will create a file DEBUG.TXT. This file contains a copy of all of the communications the DLL has had with the TW1/DW, from the perspective of the DLL. A value of one (1) turns IOdebug on; a value of zero (0) turns IOdebug off. This is helpful for troubleshooting problems with the help of Videx Customer Support.

Returns: If the download is successful, DownLoadWandList returns zero (0). If there are any errors, DownLoadWandList returns a negative number. The return values are listed on page 6.

TimeWand I/DuraWand Windows DLL

4

Page 5

long SerOpen (long ComPortNumber) Opens and initializes the specified serial port on the PC. The SerOpen function is called automatically by InitializeWand, DownloadWand, and DownloadWandList and should not be called in conjunction with these functions. It is provided here only as a utility. Parameter ComPortNumber

Description Long integer containing the number (1–9) of the desired communications port.

Returns: If the serial port is opened and initialized successfully, SerOpen returns zero (0). If any errors are encountered, SerOpen returns a negative number. The return values are listed on page 6. long SerClose (long ComPortNumber) Closes the specified serial port on the PC. The SerClose function is called automatically by InitializeWand, DownloadWand, and DownloadWandList and should not be called in conjunction with these functions. It is provided here only as a utility. Parameter ComPortNumber

Description Long integer containing the number (1–9) of the desired communications port.

Returns: If the serial port is closed successfully, SerClose returns zero (0). If any errors are encountered, SerClose returns a negative number. The return values are listed on page 6. long SetStatusMode (long statusMode) Sets the options for the status file to report the result of communication. Parameter statusMode

Description Flag to set status file options. If 0, then there is no status file (though the DLL will still create a zero length file). If 1, the status information will be appended to an existing status file. If 2, the existing status file will be overwritten with the status information from this communication.

Returns: SetStausMode returns statusMode. There are no error codes that are returned by this function. Sub SetProgress (long userFunction) Sets up a callback function to enable user cancellation of communication. The user function declaration should be: Long Function userFunction (long dummy1, long dummy2) The dummy1 and dummy2 parameters will always have a 0 value in this implementation. Future versions of this software may use these parameters to allow implementation of customized progress functions. Parameter userFunction

Description Long integer containing the address of the user function that checks for cancellation of communication.

Returns: Nothing.

TimeWand I/DuraWand Windows DLL

5

Page 6

Return Values: The DLOAD32.DLL functions return long integer values. If no error occurs, the functions return 0. Return values from -1 to -12 are Windows errors. Return values from -13 to -52 are DLL errors. The errors are listed in the following table. 0 noErr

No error

-1

IE_BADID

The device identifier is invalid or unsupported. (Does not know about the port ID that it was given.)

-2

IE_OPEN

The device is already open. (Port is already open.)

-3

IE_NOPEN

The device is not open. (Port is not open.)

-4

IE_MEMORY

The function cannot allocate the queues. (Not enough memory.)

-5

IE_DEFAULT

The default parameters are in error.

-10

IE_HARDWARE

The hardware is not available. (Locked by another device.)

-11

IE_BYTESIZE

The specified byte size is invalid.

-12

IE_BAUDRATE

The device’s baud rate is unsupported.

-13 badParamErr

Incorrect parameter in function call.

-14 portOpenAlready

Serial port already open.

-15 otherPortOpen

Other serial port is open.

-16 openButBadBaud

Serial port open but not initialized properly.

-18 portNotOpen

Serial port not open.

-20 alreadyRunning

DLOAD32 is already being run by another application.

-21 hexToASCIIErr

Error converting hex data to ASCII.

-22 noInputFile

Error accessing file for reading.

-23 noOutputFile

Error opening data file.

-24 commErr

Communications error or serial port problem.

-25 timeoutErr

Wand stopped responding to the computer.

-28 cksumErr

Communications error, data block checksum error.

-30 wandNotFound

Wand did not respond.

-36 tooManyRetries

Communications problem.

-37 statusFileErr

Error writing to STATUS.TXT file.

-38 inputFileErr

Error reading wand list for DownLoadWandList.

-39 noWandId

No valid wand ID was specified in the function call.

-43 invalidVersion

Wand has invalid version to complete communications.

-44 wandNotCleared

Wand has valid data (found during initialization).

-50 quitErr

User pressed Alt-F4 to exit the application or Windows.

-51 abortErr

User pressed Esc or right mouse button to abort.

-52 mismatchedFiles

The symbology selected does not match the symbology file name in the application file.

TimeWand I/DuraWand Windows DLL

6