Modify

Opened 13 years ago

Closed 12 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 by Jon, 13 years ago

Resolution: Rejected
Status: newclosed

comment:2 by J-Paul Mesnage, 13 years ago

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 by Jon, 12 years ago

Resolution: Rejected
Status: closedreopened
Version: 3.3.8.13.3.10.2

comment:4 by Jon, 12 years ago

Milestone: 3.3.11.2
Owner: set to Jon
Resolution: Fixed
Status: reopenedclosed

Fixed by revision [9536] in version: 3.3.11.2

Modify Ticket

Action
as closed The owner will remain Jon.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.