how can i find error / return codes?

Discussions on GFL SDK, the graphic library for reading and writing graphic files

Moderators: XnTriq, xnview

nobbe
Posts: 3
Joined: Fri Jun 08, 2007 2:00 am

how can i find error / return codes?

Post by nobbe »

hello all

i am trying to figure out how to detect if loading a file in the object fails?
i am using the activeX object to handle the files . i Read about "GFL_ERROR" , but cant seem to find out how to use on an activex object?

e.g. $rc = $imgObject.LoadBitmap ($file);
but here the $rc doesnt return anything

greetings



$imgObject = ObjCreate("GflAx.GflAx")
If $imgObject <> 0 Then

$rc = $imgObject.LoadBitmap ($file);
ConsoleWrite("load " & $rc & @CRLF)

; if loading fails??

$widthOrig = $imgObject.Width ()
$heightOrig = $imgObject.Height ()

$widthTh = Int($widthOrig / 4) ; 1/4 of original
$heightTh = Int($heightOrig / 4)