<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Events registrieren -&amp;gt; TAPI]]></title><description><![CDATA[<p>Hallo,<br />
ich ärger mich schon seit Tagen mit der implementation von TAPI</p>
<p>Mitlerweile bin ich soweit, dass meine Applikation läuft, und auch schon die Fritzkarte erkannt wird.</p>
<p>Ich habe mich an die vorgaben von hier <a href="http://msdn2.microsoft.com/en-us/library/ms734192.aspx" rel="nofollow">http://msdn2.microsoft.com/en-us/library/ms734192.aspx</a> gehalten.</p>
<p>Mein Traceprogramm zeigt zwar den einkommenenden Anruf und die Eventmessage, aber meine Applikation fängt sich nicht auf.</p>
<p>Ich habe wie beschrieben eine Klasse zum registrieren des Events</p>
<pre><code class="language-cpp">///////////////////////////////////////////////////////////////////
// CallEventNotification
//
// The only method in the ITCallEventNotification interface.  This gets
// called by TAPI 3.0 when there is a call event to report. This just
// posts the message to our UI thread, so that we do as little as
// possible on TAPI's callback thread.
//
///////////////////////////////////////////////////////////////////

HRESULT STDMETHODCALLTYPE CTAPIEventNotification::Event(IN TAPI_EVENT TapiEvent,IN IDispatch * pEvent)
{
	AfxMessageBox(&quot;ICH KOMM HIER NET REIN&quot;);
	//
	//sanity check
	//
	if(NULL == pEvent)
	{
		return S_OK;
	}

    //
    // Addref the event so it doesn't go away.
    //
    pEvent-&gt;AddRef();

    //
    // Post a message to our own UI thread.
    //

    PostMessage(g_hDlg,
		WM_PRIVATETAPIEVENT,
                (WPARAM) TapiEvent,
                (LPARAM) pEvent
               );
    return S_OK;
}
</code></pre>
<p>Ich habe auch bereits ein die AFX Message Map der cpp Datei folgendes eingefügt</p>
<pre><code class="language-cpp">ON_MESSAGE(WM_PRIVATETAPIEVENT, OnTapiEvent)
</code></pre>
<p>Und im Header</p>
<pre><code class="language-cpp">afx_msg HRESULT OnTapiEvent(IN TAPI_EVENT TapiEvent,IN IDispatch * pEvent);
</code></pre>
<p>sowie</p>
<pre><code class="language-cpp">HRESULT CFinalPCPDlg::OnTapiEvent(IN TAPI_EVENT TapiEvent,IN IDispatch * pEvent)
{
    HRESULT hr = E_FAIL;
...
...
...
    return S_OK;
}
</code></pre>
<p>Testweise habe ich mal die AFX Message zu ONMOUSEMOVE geändert, und dann wurde meine OnTapiEvent aufgerufen.</p>
<p>Also liegts wohl daran, das meine Applikation die WM_PRIVATETAPIEVENT irgendwie nicht auffängt.</p>
<p>Nur leider wird mir aus den Beschreibungen im Internet und auf der msdn Seite nicht klar, wie ich weiter machen muss <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
<p>Bin über jede Hilfe dankbar,<br />
Multiplex</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/189046/events-registrieren-gt-tapi</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Apr 2026 23:04:14 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/189046.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 08 Aug 2007 01:46:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Events registrieren -&amp;gt; TAPI on Wed, 08 Aug 2007 01:46:55 GMT]]></title><description><![CDATA[<p>Hallo,<br />
ich ärger mich schon seit Tagen mit der implementation von TAPI</p>
<p>Mitlerweile bin ich soweit, dass meine Applikation läuft, und auch schon die Fritzkarte erkannt wird.</p>
<p>Ich habe mich an die vorgaben von hier <a href="http://msdn2.microsoft.com/en-us/library/ms734192.aspx" rel="nofollow">http://msdn2.microsoft.com/en-us/library/ms734192.aspx</a> gehalten.</p>
<p>Mein Traceprogramm zeigt zwar den einkommenenden Anruf und die Eventmessage, aber meine Applikation fängt sich nicht auf.</p>
<p>Ich habe wie beschrieben eine Klasse zum registrieren des Events</p>
<pre><code class="language-cpp">///////////////////////////////////////////////////////////////////
// CallEventNotification
//
// The only method in the ITCallEventNotification interface.  This gets
// called by TAPI 3.0 when there is a call event to report. This just
// posts the message to our UI thread, so that we do as little as
// possible on TAPI's callback thread.
//
///////////////////////////////////////////////////////////////////

HRESULT STDMETHODCALLTYPE CTAPIEventNotification::Event(IN TAPI_EVENT TapiEvent,IN IDispatch * pEvent)
{
	AfxMessageBox(&quot;ICH KOMM HIER NET REIN&quot;);
	//
	//sanity check
	//
	if(NULL == pEvent)
	{
		return S_OK;
	}

    //
    // Addref the event so it doesn't go away.
    //
    pEvent-&gt;AddRef();

    //
    // Post a message to our own UI thread.
    //

    PostMessage(g_hDlg,
		WM_PRIVATETAPIEVENT,
                (WPARAM) TapiEvent,
                (LPARAM) pEvent
               );
    return S_OK;
}
</code></pre>
<p>Ich habe auch bereits ein die AFX Message Map der cpp Datei folgendes eingefügt</p>
<pre><code class="language-cpp">ON_MESSAGE(WM_PRIVATETAPIEVENT, OnTapiEvent)
</code></pre>
<p>Und im Header</p>
<pre><code class="language-cpp">afx_msg HRESULT OnTapiEvent(IN TAPI_EVENT TapiEvent,IN IDispatch * pEvent);
</code></pre>
<p>sowie</p>
<pre><code class="language-cpp">HRESULT CFinalPCPDlg::OnTapiEvent(IN TAPI_EVENT TapiEvent,IN IDispatch * pEvent)
{
    HRESULT hr = E_FAIL;
...
...
...
    return S_OK;
}
</code></pre>
<p>Testweise habe ich mal die AFX Message zu ONMOUSEMOVE geändert, und dann wurde meine OnTapiEvent aufgerufen.</p>
<p>Also liegts wohl daran, das meine Applikation die WM_PRIVATETAPIEVENT irgendwie nicht auffängt.</p>
<p>Nur leider wird mir aus den Beschreibungen im Internet und auf der msdn Seite nicht klar, wie ich weiter machen muss <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
<p>Bin über jede Hilfe dankbar,<br />
Multiplex</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1340501</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1340501</guid><dc:creator><![CDATA[Multiplex]]></dc:creator><pubDate>Wed, 08 Aug 2007 01:46:55 GMT</pubDate></item></channel></rss>