Page 1 of 1 1
Topic Options
#139025 - 2005-05-02 08:25 PM (317 / 13D)
JoNstart Offline
Lurker

Registered: 2005-05-02
Posts: 2
Hiya folks. Somewhat new KiXtart scripter here. I have a script which occassionally returns me the following error text:

"Error (317 / 13D) while retrieving error information for FFFFFFFF"

I cannot understand why I get this error, as I do not understand WHAT the error refers to. I have tried some of the various scripts available here for listing error codes, and noticed they all filter out codes with "(317 / 13D)" in them.

Can anyone shed some light on this?

Code follows:
Code:

;*******************************************************************************************
;** Name :SplitFAx.kix
;*******************************************************************************************
;** TiffConvert.exe - used to split multipage fax images into mulitple files (one file per page)
;**
;** Usage: TiffConvert input output [-m] [-n] [-e ]
;** input name of file to convert
;** output name of converted file (without extension if multifile)
;** -m output will be multifile (one page per tiff file)
;** -n output pages will be normalized
;** -e encoding specify encoding to use for tiff image, possible values
;** are G3 and G4
;*******************************************************************************************

BREAK ON ; allows CTRL + C to end running scripts

;***************************************************************
;***** Variable Declarations **
;***************************************************************
GLOBAL $LOG_FILE $LOG_FILE = "G:\Eswitch\split_fax_error.log"
GLOBAL $ESWITCH_USER $ESWITCH_USER = "eSwitch"
DIM $ESWITCH_SCRIPT $SPLITFAX_SCRIPT = "G:\Eswitch\TiffConvert.exe"
DIM $LOG_MESSAGE
DIM $MAIL_SUBJECT

;***************************************************************
;*****Function LogError() to log error messages. **
;***************************************************************
FUNCTION Log($LogMessage, $LogFile)
$HANDLE = FreeFileHandle()
IF $HANDLE > 0
IF Open($HANDLE, $LogFile, 5) = 0
$x = WriteLine($HANDLE, $LogMessage + @CRLF)
Close($HANDLE)
ELSE
BEEP
? "Function: LogError - Error opening file " + $LogFile + " , error code : [" + @ERROR + "]"
ENDIF
ENDIF
ENDFUNCTION
;***************************************************************
;*****Function SendMail to send mail using SMTP (blat). **
;***************************************************************
FUNCTION SendMail($MailTo, $MailFrom, $Subject, $Body)
$MailString = 'blat ' + '"' + %BLATFILE% + '"' + ' -q -server ' + '"' + %SMTP_SERVER% + '"' + ' -tf ' + '"' + $MailTo + '"' + ' -f ' + '"' + $MailFrom + '"' + ' -s ' + '"' + $Subject + '"' + ' -replyto noone@dhltd.com -body ' + '"' + $Body + '"'
SHELL ($MailString)
ENDFUNCTION

;***************************************************************
;***** Split eSwitch Faxes into their component pages. **
;***************************************************************

SELECT

CASE CSTR($4)==$ESWITCH_USER

;******************************************************
;** This is an eSwitch fax, so rename received file. **
;******************************************************
$TEMPFILE = $1 + ".tmp"
$shellcommand = "cmd /c Move " + $1 + ".001 " + $TEMPFILE
SHELL $shellcommand
IF @ERROR <> 0
$LOG_MESSAGE = @DATE + " " + @TIME + " - Error in SplitFax.kix: Could not rename eSwitch Fax image file " + $1 + ".001" + " to " + $TEMPFILE + " -- Error = " + @ERROR + " " + @SERROR
Log($LOG_MESSAGE, $LOG_FILE)
$MAIL_SUBJECT = 'eSwitch Fax Error: Could not split file'
SendMail(%ESWITCH_MAINTAIN%, %ES_EMAIL_FROM%, $MAIL_SUBJECT, $LOG_MESSAGE)
EXIT
ENDIF

;*******************************************************
;** Split the received file into its component pages. **
;*******************************************************

$shellcommand = $SPLITFAX_SCRIPT + " " + $TEMPFILE + " " + $1 + " -m"
SHELL $shellcommand
IF @ERROR <> 0
Log($LOG_MESSAGE, $LOG_FILE)
$MAIL_SUBJECT = 'eSwitch Fax Error: Could not split file'
SendMail(%ESWITCH_MAINTAIN%, %ES_EMAIL_FROM%, $MAIL_SUBJECT, $LOG_MESSAGE)
EXIT
ENDIF

;****************************
;** Delete the ".tmp" file **
;****************************
$shellcommand = "cmd /c Del " + $TEMPFILE
IF @ERROR <> 0
$LOG_MESSAGE = @DATE + " " + @TIME + " - Error in SplitFax.kix: Could not delete eSwitch Fax image file " + $TEMPFILE + " -- Error = " + @ERROR + " " + @SERROR
Log($LOG_MESSAGE, $LOG_FILE)
$MAIL_SUBJECT = 'eSwitch Fax Error: Could not split file'
SendMail(%ESWITCH_MAINTAIN%, %ES_EMAIL_FROM%, $MAIL_SUBJECT, $LOG_MESSAGE)
EXIT
ENDIF

CASE 1

;******************************************************************************
;** This is not an eSwitch fax, so delete the image file from "New" directory**
;******************************************************************************
$shellcommand = "cmd /c Del " + $1 + ".001"
SHELL $shellcommand
IF @ERROR <> 0
$LOG_MESSAGE = @DATE + " " + @TIME + " - Error in SplitFax.kix: Could not delete " + $1 + ".001 (non-eSwitch Fax) -- Error = " + @ERROR + " " + @SERROR
Log($LOG_MESSAGE, $LOG_FILE)
$MAIL_SUBJECT = 'eSwitch Fax Error: Could not split file'
SendMail(%ESWITCH_MAINTAIN%, %ES_EMAIL_FROM%, $MAIL_SUBJECT, $LOG_MESSAGE)
EXIT
ENDIF

ENDSELECT



Top
#139026 - 2005-05-03 10:00 AM Re: (317 / 13D)
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
The message you are getting means "I've got error NUMBER FFFFFFFF, but I can't find an error MESSAGE to go with it."

Error FFFFFFFF is not a valid standard Windows error message. It's decimal value is "-1", so you are picking that up from somewhere and trying to display it as an error message.

Top
#139027 - 2005-05-03 02:57 PM Re: (317 / 13D)
JoNstart Offline
Lurker

Registered: 2005-05-02
Posts: 2
Thanx alot Richard.
So I guess the error is coming directly from "TiffConvert.exe". Now it only remains to decifer THAT error.

Incidentally, what is the (317//13D) all about?

Top
#139028 - 2005-05-03 04:24 PM Re: (317 / 13D)
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Well, it's all a bit circular... that's the error code (and message) for not being able to find a message.

The code is a constant, so for example if you try and print error messages 2020-2030 using:
Code:
For $i = 2020 to 2030
$=Execute("Exit "+$i)
@ERROR " " @SERROR ?
Next



You will get the "message does not exist" error for codes 2023-2030 because they don't have a valid message:
Quote:

2020 The specified color transform is invalid.
2021 The specified transform does not match the bitmap's color space.
2022 The specified named color index is not present in the profile.
2023 Error (317 / 13D) while retrieving error information for 7E7
2024 Error (317 / 13D) while retrieving error information for 7E8
2025 Error (317 / 13D) while retrieving error information for 7E9
2026 Error (317 / 13D) while retrieving error information for 7EA
2027 Error (317 / 13D) while retrieving error information for 7EB
2028 Error (317 / 13D) while retrieving error information for 7EC
2029 Error (317 / 13D) while retrieving error information for 7ED
2030 Error (317 / 13D) while retrieving error information for 7EE




BTW the error message text is a Windows API feature, not a KiXtart feature.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 472 anonymous users online.
Newest Members
StuTheCoder, M_Moore, BeeEm, min_seow, Audio
17884 Registered Users

Generated in 0.053 seconds in which 0.026 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org