﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
1658	COM / OLE object access causes error code 80020003 - member not found	Frank <temp.kfl42ai@…>	Jon	"Hallo,

while writing some AutoIt scripts to automate one of our ERP-Applications, which includes an OLE / COM Interface with late bindung, I get some exceptional errors.

For some methods of the COM-Objects, the following error was reported: COM-Object error 80020003, Member not Found.

The same methods or rather the whole COM Interface works fine when using it with other programming languages like VBA, VBScript, C# VC++ etc. in the same environment (OS etc.) and the same manner (syntax etc.).

Therefor the software vendor says that his application (written in Delphi) and its COM-Interface (Type: late bindung) is in proper style and it must be an problem with AutoIt.

Here is an example:



{{{
Local $oHWP
Local $wert
Local $i

$oHWP = ObjCreate (""HWP.Anwendung"")

if ($oHWP.Angemeldet = 0) Then         ; check if logged in -> works
    $oHWP.Anmelden (""USER"",""PASSWORD"") ; login with credentials ->
                                       ; cause COM-Error 80020003 - 
                                       ; Member not found
endif

$wert = $oHWP.Version                  ; get version number -> works

$wert = $oHWP.Table(""ADR"").Anzahl      ; number of contacts -> works

$oHWP.Table(""ADR"").ErsterSatz          ; go to first record ->
                                       ; cause COM-Error 80020003 -
                                       ; Member not found""

For $i = 1 to $wert
    ; do something with current record,
    $oHWP.Table(""ADR"").NaechsterSatz   ; go to next record -> works
Next

$oHWP = 0

Exit
}}}


It's very strange that the statement ""$oHWP.Table(""ADR"").NaechsterSatz"" works fine while the statement ""$oHWP.Table(""ADR"").ErsterSatz"" causes an error although both works fine while using them in many other programming languages.
Also an simple call of the method ""$oHWP.Anmelden (""..."")"" causes an error 80020003 while it doesn't in VBA etc.

Is there a bug in AutoIt?

P.S.:
- All error codes are determined by standard error handling of AutoIt ($oMyError = ObjEvent(""AutoIt.Error"",""MyErrFunc"") etc.), which was omit for the reason of clarity of code.
- Using of COM methods (syntax etc.) in the example above is in accordance of the programming guidelines of the software vendor
With best regards, Frank"	Bug	closed	3.3.7.22	AutoIt	Other	None	Fixed	COM / OLE Object - Error Code 80020003, Member not found	
