Sign in to follow this  
Followers 0
fschreiner

AutoIt crashs when using a COM object method

3 posts in this topic

All,

I run into a problem with AutoIt when I use a COM object method. The application crashs completely

and the Windows "Send Error Report" dialog appears. The creation of the object is successful, the method

I'm calling takes a few seconds to run, I don't know if there's something like a timeout?

I tried to use the COM object method within a small VisualBasic 6 application, there it's completely

working.

AutoIt Version: 3.2.10.0

OS Version: Windows XP Professional

$oTelephony = ObjCreate("ActiveCTI.Telephony")
    If not @error then
        Msgbox(0,"ObjCreate","ObjCreate() successfully completed!")
    Else
        Msgbox(0,"ObjCreate","ObjCreate() not successful!")
    Endif
$oTelephony.Login("qtapi", "qtapi123", "AVAYA#ACMFRANKFURTOF#CSTA#DE307623AES1", "Test")
MsgBox(4096, "LoginStatus", "Login Finished")

The last message box doesn't appear, the app crashs before.

The error report says:

Exeption Information

Code: 0x0000005 Flags: 0x00000000

Record: 0x0000000000000000 Address: 0x000000001000bc49

Do you guys have any idea how to get the app fixed?

(I have the some error report information attached)

Thanks

Fred

3989_appcompat.txt

Share this post


Link to post
Share on other sites



Add an error handler to your script per the help file under OBJ/COM reference:

$oMyError = ObjEvent("AutoIt.Error","MyErrFunc") ; Install a custom error handler 

$oTelephony = ObjCreate("ActiveCTI.Telephony")
    If Not @error Then
        Msgbox(0,"ObjCreate","ObjCreate() successfully completed!")
    Else
        Msgbox(0,"ObjCreate","ObjCreate() not successful!")
    Endif
$oTelephony.Login("qtapi", "qtapi123", "AVAYA#ACMFRANKFURTOF#CSTA#DE307623AES1", "Test")
MsgBox(4096, "LoginStatus", "Login Finished")

; This is my custom error handler 
Func MyErrFunc() 
   $HexNumber=hex($oMyError.number,8) 
   Msgbox(0,"","We intercepted a COM Error !" & @CRLF & _
                "Number is: " & $HexNumber & @CRLF & _
                "Windescription is: " & $oMyError.windescription ) 

   SetError(1) ; something to check for when this function returns 
Endfunc

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

Hi,

thanks for your quick response. I tried to add the error handler, but it didn't help.

The application/AutoIt still crashs completely, there is no output from the error handler. I think

the error handler method isn't called. So this might be a basic AutoIt error then?!

Fred

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0