background image

 

Section 3 – API DLL 

27 

MTECSDK_SetLogFileHandle 

 

MTECSDK_SetLogFileHandle 

specifies a handle for a log file

All messages and errors created by all API functions will be 

logged in the log file that has this specified handle.  By default, there is no log file  

 

VOID MTECSDK_SetLogFileHandle  ( 

HANDLE   hFileHandle 

); 

 

Parameters 

 
hFileHandle 

This is a handle to a file.  All the API functions will log errors and information to this log file. 

 

Return Values 

No value is returned from this function. 

 

Remarks 

 

Example 

 

#define DEVICE_NAME_LEN 128 
int i=1; 
DWORD dwResult; 
HANDLE fileHandle; 
char cDeviceName[DEVICE_NAME_LEN]=""; 
while ((dwResult = MTECSDK_GetDevice(i,(char*) cDeviceName)) != EC_ST_DEVICE_NOT_FOUND) 

if (MTECSDK_OpenDevice (cDevicesNames) == EC_ST_OK) 

 //Get 

timeout 

DWORD timeout; 
HANDLE fileHandle; 
 
// Create log file and save the handle in fileHandle 
 
// Pass the handle of the log file 

 MTECSDK_SetLogFileHandle 

(fileHandle); 

///close the device 
// Close the log file 
// Close the device 

 } 
 i++; 

if (MTECSDK_OpenDevice (cDevicesNames) == EC_ST_OK) 

 // 

Process 

documents 

///close the device 
MTECSDK_CloseDevice (cDeviceName); 

  

 i++; 
}

 

Содержание EXPRESSCARD 1000

Страница 1: ...RENCE MANUAL WINDOWS API SPECIFICATIONS MANUAL PART NUMBER 99875367 1 SEPTEMBER 2007 REGISTERED TO ISO 9001 2000 1710 Apollo Court Seal Beach CA 90740 Phone 562 546 6400 FAX 562 546 6301 Technical Sup...

Страница 2: ...nt may be reproduced or transmitted in any form or by any means electronic or mechanical for any purpose without the express written permission of MagTek Inc MagTek is a registered trademark of MagTek...

Страница 3: ...ditions or restrictions contained herein Should Licensor terminate this Agreement due to Licensee s failure to comply Licensee agrees to return the Software to Licensor Receipt of returned Software by...

Страница 4: ...Error Reporting 12 Debugging API 12 SECTION 3 EXPRESSCARD 1000 API 13 MTECSDK_GetDevice 13 Parameters 13 Return Values 13 Remarks 13 Example 13 MTECSDK_OpenDevice 14 Parameters 14 Return Values 14 Re...

Страница 5: ...Example 23 MTECSDK_GetAttribute 24 Parameters 24 Return Values 24 Remarks 24 Example 25 MTECSDK_LogEnable 26 Parameters 26 Return Values 26 Remarks 26 Example 26 MTECSDK_SetLogFileHandle 27 Parameter...

Страница 6: ......

Страница 7: ...module Mechanically embosses indents characters on card surface Exit module Exits completed card or stores rejected card in internal hopper Secure enclosure that can logically detect permit access to...

Страница 8: ...nd status and functional aspects the device interface Of primary importance is to review the code samples contained in the appendices of this document The code samples provide clear instructions regar...

Страница 9: ...tions used follow the illustration Application Figure 2 1 ExpressCard 1000 Software Architecture COMPUTER EXPRESSCARD 1000 DEVICE Wininet dll C API to xfer data to a web XML to Key Value and vice vers...

Страница 10: ...to XML format using msxml4 dll and then send it to the device using wininet dll It also provides functions to convert the response from the device XML format to key value pairs msxml4 dll Microsoft XM...

Страница 11: ...s of the ExpressCard 1000 device to obtain device capabilities information is followed Assuming the ExpressCard 1000 device has IP address 192 168 10 100 type the following line in the address box of...

Страница 12: ...in device status information Assuming the ExpressCard 1000 device has IP address 192 168 10 100 type the following line in the address box of the Web browser Internet Explorer is used in this example...

Страница 13: ...e usage information Assuming the ExpressCard 1000 device has IP address 192 168 10 100 type the following line in the address box of the Web browser Internet Explorer is used in this example https 192...

Страница 14: ...r This file contains a list of default ExpressCard 1000 connections and IP addresses This file is required by the MTECSDK dll MTECSDK dll Windows System32 folder ExpressCard 1000 API wininet dll Windo...

Страница 15: ...ends a process request to a given device to process card with given options 16 MTECSDK_QueryInfo Sends a request to a given device name to query for info on a given query parameter 18 MTECSDK_SendComm...

Страница 16: ...Figure 2 4 illustrates the sequence of document processing ExpressCard 1000 Present Successful Open Device Select desired options for document processing Yes Yes Send Options to Device Check Completio...

Страница 17: ...to send the process options to the ExpressCard 1000 device 5 ExpressCard 1000 processes the document with the given process options and returns the result of the process operation The result is stored...

Страница 18: ...and return messages from the ExpressCard 1000 If an error occurs due to the failure of API function the error is returned as the return code of the API provided by MTECSDK dll The Windows XML Specific...

Страница 19: ...EC_ST_DEVICE_NOT_FOUND EC_ST_BAD_PARAMETER Remarks If the function succeeds the return value is EC_ST_OK The device name of the device is filled in the buffer pointed by the parameter pcDevName If th...

Страница 20: ...E_NAME EC_ST_DEVICE_NOT_FOUND EC_ST_DEVICE_NOT_RESPONDING EC_ST_MSXML_NOT_FOUND Remarks If the pcDevName is NULL the return value is EC_ST_BAD_DEVICE_NAME If no device is found the return value is EC_...

Страница 21: ...Return Values EC_ST_OK EC_ST_BAD_DEVICE_NAME EC_ST_DEVICE_NOT_FOUND Remarks If the pcDevName is NULL the return value is EC_ST_BAD_DEVICE_NAME Example define DEVICE_NAME_LEN 128 int i 1 DWORD dwResult...

Страница 22: ...ntaining the options to be used in processing the card The options are stored in the buffer by using function MTECSDK_SetValue pcDocInfo Pointer to the buffer containing the information returned from...

Страница 23: ...ror results from bad connection with device can be one of the following EC_ST_CONNECT_REQUEST_TIMEDOUT EC_ST_REQUEST_TIMEDOUT EC_ST_DEVICE_NOT_RESPONDING EC_ST_ERR_INTERNET_CONNECT EC_ST_ERR_HTTP_OPEN...

Страница 24: ...the section name e g Device Capabilities Device Usage DeviceStatus etc pcSectionData Pointer to the buffer that is used to store the data of the inquiry section pdwLength Specifies the size of the pc...

Страница 25: ...from bad connection with device can be one of the following EC_ST_CONNECT_REQUEST_TIMEDOUT EC_ST_REQUEST_TIMEDOUT EC_ST_DEVICE_NOT_RESPONDING EC_ST_ERR_INTERNET_CONNECT EC_ST_ERR_HTTP_OPEN_REQUEST EC_...

Страница 26: ...the pcOptions buffer Return Values EC_ST_OK EC_ST_NOT_ENOUGH_MEMORY EC_ST_BAD_DATA EC_ST_BAD_SECTION_NAME EC_ST_BAD_BUFFER_LENGTH Remarks The function returns EC_ST_NOT_ENOUGH_MEMORY if the pcOptions...

Страница 27: ...using MTECSDK_SetValue function ULONG MTECSDK_GetValue char pcDocInfo char pcSection char pcKey char pcValue DWORD pdwLength Parameters pcDocInfo Buffer pointer containing all the key value pairs pcS...

Страница 28: ...eter EC_ST_KEY_NOT_FOUND is returned Example char Settings 4096 char DocInfo 4096 char device 4096 DWORD SettingsBufferSize DWORD DocInfoSize char cValue 1024 DWORD valueSize DWORD dwStatus Initialize...

Страница 29: ...ptions buffer Return Values EC_ST_OK EC_ST_NOT_ENOUGH_MEMORY EC_ST_BAD_DATA EC_ST_BAD_SECTION_NAME EC_ST_BAD_BUFFER_LENGTH Remarks The function returns EC_ST_NOT_ENOUGH_MEMORY if the pcOptions buffer...

Страница 30: ...s the retrieved string pdwLength Specifies the size of the pcAttribute buffer Return Values EC_ST_OK EC_ST_NOT_ENOUGH_MEMORY EC_ST_ERR_LOAD_XML EC_ST_ERR_GET_DOM_POINTER EC_ST_BAD_DATA EC_ST_BAD_SECTI...

Страница 31: ...tion MTECSDK_GetDevice to get device name for variable device Call MTECSDK_ProcessDoc function to process a document dwStatus MTECSDK_ProcessDoc device Settings DocInfo DocInfoSize if dwStatus MTEC_ST...

Страница 32: ...unction MTECSDK_SetLogFileHandle and also a TRUE value is set for parameter of function MTECSDK_LogEnable By default logging is disable void MTECSDK_LogEnable BOOL bEnable Parameters bEnable a Boolean...

Страница 33: ...Return Values No value is returned from this function Remarks Example define DEVICE_NAME_LEN 128 int i 1 DWORD dwResult HANDLE fileHandle char cDeviceName DEVICE_NAME_LEN while dwResult MTECSDK_GetDev...

Отзывы: