1. Dashboard
  2. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  3. Forenregeln
  4. Forum
    1. Unerledigte Themen
  • Anmelden
  • Registrieren
  • Suche
Alles
  • Alles
  • Artikel
  • Seiten
  • Forum
  • Erweiterte Suche
  1. AutoIt.de - Das deutschsprachige Forum.
  2. Mitglieder
  3. shendo

Beiträge von shendo

  • Tapi COM EVENT Hadling - Type mismatch 0x80028CA0 - ITTAPIEventNotification

    • shendo
    • 29. Oktober 2015 um 13:12

    Hallo Leute,

    hat keiner von euch eine Idee waran das liegen kann???

    Ich bin mit meinem Latein am Ende. ?(?(?(

    Gibt es da drausen keinen COM-Spezialisten :thumbup:

    Wenn ich die Frage im falschen Bereich eröffnet habe bitte sagen oder verschieben.

    Bitte ist wirklich sehr wichtig für mich.

    Bin für jede Idee dankbar.

  • Tapi COM EVENT Hadling - Type mismatch 0x80028CA0 - ITTAPIEventNotification

    • shendo
    • 8. Oktober 2015 um 10:28

    Hallo Leute,

    erstmal nette grüße an alle im Forum, ich bin hier neu :D

    Ich hab ein Problem, wo ich einfach nicht mehr weiter komme:

    Zurzeit versuche ich ein kleines Programm zuschreiben, um einkommende Anrufe über Tapi in einer Anrufliste an zu zeigen.

    Das Registrieren für Call Events von Tapi mittels der Methode RegisterCallNotifications() funktioniert auch einwand frei (zu sehen am RegToken den ich zurück bekomme)
    Nur bekomme ich folgende COM Fehlermeldung:

    notify.au3 (57) : ==> COM Error intercepted !
    err.number is: 0x80028CA0
    err.windescription: Typenkonflikt.


    err.description is:
    err.source is:
    err.helpfile is:
    err.helpcontext is:
    err.lastdllerror is: 0
    err.scriptline is: 57
    err.retcode is: 0x00000000

    Habe es auch schon mit zwei Übergabeparametern für ITTAPIEventNotification.Event() versucht, wie bei Microsoft beschrieben:
    HRESULT Event( [in] TAPI_EVENT TapiEvent, [in] IDispatch *pEvent);

    Ich hab einfach keine Ahnung mehr was ich falsch mache ?(?(?(
    Bin für jede Hilfe offen!!!
    Hier ist mein Code:

    AutoIt
    $custom_number = 418
    $txtAddressName = "Alice Line  SIP 418"
    Global Const $LINEADDRESSTYPE_PHONENUMBER = "&H1"
    Global Const $LINEMEDIAMODE_INTERACTIVEVOICE = "&H4"
    Global Const $TAPI3_ALL_TAPI_EVENTS = "&H1FFFF"
    Global Const $fOwner = True			; ensures that the application receives incoming calls and their call state events
    Global Const $fMonitor = True		; Boolean value indicating whether the application will own incoming calls. TRUE indicates that the application will own incoming
    									;calls; FALSE indicates that it will not.
    Global Const $lMediaTypes = "&H8"; 8
    Global Const $lCallbackInstance = "&H1"; 1
    Global $regToken
    Global $gobjAddress
    Global $objTapi
    Global $objTapiEvent
    Global $objTapiWithEvents
    Global $oErrorHandler
    ; objTapi.RegisterCallNotifications( [in] ITAddress* pAddress, [in] VARIANT_BOOL fMonitor, [in] VARIANT_BOOL fOwner, [in] long lMediaTypes, [in] long lCallbackInstance )
    ;~ 	_add_CallToList($custom_number)
    	Local  $lAddressType = $LINEADDRESSTYPE_PHONENUMBER
    	Global $bolFoundLine
    	$oErrorHandler = ObjEvent("AutoIt.Error", "_ErrFunc")
    	$objTapi = ObjCreate("TAPI.TAPI")
    	$mapper = ObjCreate("DispatchMapper.DispatchMapper.1")
    	$objTapi.Initialize
    	$objTapi.EventFilter = $TAPI3_ALL_TAPI_EVENTS
    	$objCollAddresses = $objTapi.Addresses
    	For $lLoop = 1 To $objCollAddresses.Count
    		$objCrtAddress = $objCollAddresses.Item($lLoop)
    		If $objCrtAddress.AddressName = $txtAddressName Then
    			$gobjAddress = $objCrtAddress
    			$bolFoundLine = True
    			ExitLoop
    		EndIf
    	Next
    	If $bolFoundLine = True Then
    		$objTapiWithEvents = $objTapi
    		$regToken = $objTapiWithEvents.RegisterCallNotifications($gobjAddress, $fMonitor, $fOwner, $lMediaTypes, $lCallbackInstance)
    		If @error Then ConsoleWrite("Es gab einen Fehler bei $regToken" & @CRLF)
    		ConsoleWrite("########## RegTokken: ->" & $regToken & "<- #########################" & @CRLF)
    		Sleep(3000) ; zeit geben zum Initialisieren der RegisterCallNotifications Methode
    ;~ 		ConsoleWrite(VarGetType($objTapiWithEvents) & @CRLF)
    		Local $test = ObjEvent($objTapi, "_TapiEvent_", "ITTAPIEventNotification")
    		If @error Then ConsoleWrite("Es gab einen Fehler bei objEvent" & @CRLF)
    		ConsoleWrite("$test ='" & $test & "'" & @CRLF)
    		ConsoleWrite("blub" & @CRLF)
    	EndIf
    	While 1
    		Sleep(100)
    	WEnd
    ; Event method definition
    Func _TapiEvent_ITTAPIEventNotification();($Tapi_Event, $IDispatch)
    	ConsoleWrite("event geht ein!!!!" & @CRLF)
    	Local $ret = "&H0"
    	return $ret
    EndFunc
    	; User's COM error function. Will be called if COM error occurs
    Func _ErrFunc($oError)
        ; Do anything here.
        ConsoleWrite(@ScriptName & " (" & $oError.scriptline & ") : ==> COM Error intercepted !" & @CRLF & _
                @TAB & "err.number is: " & @TAB & @TAB & "0x" & Hex($oError.number) & @CRLF & _
                @TAB & "err.windescription:" & @TAB & $oError.windescription & @CRLF & _
                @TAB & "err.description is: " & @TAB & $oError.description & @CRLF & _
                @TAB & "err.source is: " & @TAB & @TAB & $oError.source & @CRLF & _
                @TAB & "err.helpfile is: " & @TAB & $oError.helpfile & @CRLF & _
                @TAB & "err.helpcontext is: " & @TAB & $oError.helpcontext & @CRLF & _
                @TAB & "err.lastdllerror is: " & @TAB & $oError.lastdllerror & @CRLF & _
                @TAB & "err.scriptline is: " & @TAB & $oError.scriptline & @CRLF & _
                @TAB & "err.retcode is: " & @TAB & "0x" & Hex($oError.retcode) & @CRLF & @CRLF)
    EndFunc   ;==>_ErrFunc
    Alles anzeigen


    Vielen Dank an alle hier die helfen wollen :)

Spenden

Jeder Euro hilft uns, Euch zu helfen.

Download

AutoIt Tutorial
AutoIt Buch
Onlinehilfe
AutoIt Entwickler
  1. Datenschutzerklärung
  2. Impressum
  3. Shoutbox-Archiv
Community-Software: WoltLab Suite™