Modify

Opened 11 years ago

Closed 10 years ago

#2316 closed Bug (Fixed)

PowerPoint COM event handler initialization error

Reported by: anonymous Owned by: Jon
Milestone: 3.3.11.2 Component: AutoIt
Version: 3.3.10.2 Severity: None
Keywords: Cc:

Description

I'm getting this error while trying to initialize a com event handler for Office PowerPoint events:

err.number is: -2147316576
err.windescription: Type mismatch.

The code i run is:

Local $oMyError = ObjEvent("AutoIt.Error","MyErrFunc") ; Initialize a COM error handler

Local $AppPowerPoint = ObjCreate("PowerPoint.Application")

If Not IsObj($AppPowerPoint) Then
	MsgBox(0, "Error", "$AppPowerPoint is not an Object.")
Else
	MsgBox(0, "Error", "Successfully created Object $AppPowerPoint.")
EndIf
   
Local $pptEvt = ObjEvent($AppPowerPoint, "PowerPointEvent_") ; Initialize PowerPoint COM event handlers

Func MyErrFunc($oError)
	ConsoleWrite("err.number is: " & @TAB & $oError.number & @CRLF & "err.windescription:" & @TAB & $oError.windescription & @CRLF)
EndFunc

The error occurs on the line:
Local $pptEvt = ObjEvent($AppPowerPoint, "PowerPointEvent_") ; Initialize PowerPoint COM event handlers

and happens on Version 3.3.8.1 and 3.3.9.4 (Beta), but not on 3.3.6.1.

Tested on Win8 x64 and Win7 x64

Relevant thread: http://www.autoitscript.com/forum/topic/148251-powerpoint-com-event-handler-initialization-error/

Attachments (0)

Change History (4)

comment:1 Changed 11 years ago by Jon

  • Resolution set to Rejected
  • Status changed from new to closed

comment:2 Changed 11 years ago by Jpm

In fact As I am not and COM expert I cannot give definitive answer.

But What I can say is the COM error handling has been fied.
I you run under 3.3.4.0 at least under Win8 with Powerpoint 2010 you get a recursive calls to the errorhandler just returning 0 for any err information.

I suspect the problem is really around PowePoint itself.

comment:3 Changed 10 years ago by Jon

  • Resolution Rejected deleted
  • Status changed from closed to reopened
  • Version changed from 3.3.8.1 to 3.3.10.2

comment:4 Changed 10 years ago by Jon

  • Milestone set to 3.3.11.2
  • Owner set to Jon
  • Resolution set to Fixed
  • Status changed from reopened to closed

Fixed by revision [9536] in version: 3.3.11.2

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The owner will remain Jon.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.