<?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[RegisterDeviceNotification --&amp;gt; NotificaionFilter --&amp;gt; ClassGUID]]></title><description><![CDATA[<p>Ich versuche in meinem &quot;Windows Service&quot; ein Message zu bekommen, wenn ein USB Stick angeschlossen bzw. entfernt wird.</p>
<p>Dafür brauche ich ja die HandlerEx FUnktion.</p>
<p>Nun will ich RegisterDeviceNotification verwenden um dafür zu sorgen, dass ich die angesprochene Message auch bekomme.</p>
<p>Allerdings verstehe ich überhaupt nicht, was der 2. Parameter soll??</p>
<blockquote>
<p>NotificationFilter<br />
[in] Pointer to a block of data that specifies the type of device for which notifications should be sent. This block always begins with the DEV_BROADCAST_HDR structure. The data following this header is dependent on the value of the dbch_devicetype member, which can be DBT_DEVTYP_DEVICEINTERFACE or DBT_DEVTYP_HANDLE. For more information, see Remarks.</p>
</blockquote>
<p>Mir sind da schon Begriffe wie ClassGUID und so über den Weg gelaufen allerdings kann ich das überhaupt nicht einordnen.</p>
<p>Kann mir das jemand erklären???</p>
<p>MFG<br />
Ace</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/177884/registerdevicenotification-gt-notificaionfilter-gt-classguid</link><generator>RSS for Node</generator><lastBuildDate>Mon, 06 Jul 2026 06:12:29 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/177884.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 04 Apr 2007 22:57:46 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to RegisterDeviceNotification --&amp;gt; NotificaionFilter --&amp;gt; ClassGUID on Wed, 04 Apr 2007 22:57:46 GMT]]></title><description><![CDATA[<p>Ich versuche in meinem &quot;Windows Service&quot; ein Message zu bekommen, wenn ein USB Stick angeschlossen bzw. entfernt wird.</p>
<p>Dafür brauche ich ja die HandlerEx FUnktion.</p>
<p>Nun will ich RegisterDeviceNotification verwenden um dafür zu sorgen, dass ich die angesprochene Message auch bekomme.</p>
<p>Allerdings verstehe ich überhaupt nicht, was der 2. Parameter soll??</p>
<blockquote>
<p>NotificationFilter<br />
[in] Pointer to a block of data that specifies the type of device for which notifications should be sent. This block always begins with the DEV_BROADCAST_HDR structure. The data following this header is dependent on the value of the dbch_devicetype member, which can be DBT_DEVTYP_DEVICEINTERFACE or DBT_DEVTYP_HANDLE. For more information, see Remarks.</p>
</blockquote>
<p>Mir sind da schon Begriffe wie ClassGUID und so über den Weg gelaufen allerdings kann ich das überhaupt nicht einordnen.</p>
<p>Kann mir das jemand erklären???</p>
<p>MFG<br />
Ace</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1259665</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1259665</guid><dc:creator><![CDATA[AceKiller73]]></dc:creator><pubDate>Wed, 04 Apr 2007 22:57:46 GMT</pubDate></item><item><title><![CDATA[Reply to RegisterDeviceNotification --&amp;gt; NotificaionFilter --&amp;gt; ClassGUID on Thu, 05 Apr 2007 20:11:07 GMT]]></title><description><![CDATA[<p>*push* Kennt sich keiner damit aus?</p>
<p>MFG<br />
Ace</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1260372</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1260372</guid><dc:creator><![CDATA[AceKiller73]]></dc:creator><pubDate>Thu, 05 Apr 2007 20:11:07 GMT</pubDate></item><item><title><![CDATA[Reply to RegisterDeviceNotification --&amp;gt; NotificaionFilter --&amp;gt; ClassGUID on Thu, 05 Apr 2007 20:27:02 GMT]]></title><description><![CDATA[<p><a href="http://www.codeproject.com/useritems/Windows_Services.asp" rel="nofollow">http://www.codeproject.com/useritems/Windows_Services.asp</a> ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1260375</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1260375</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Thu, 05 Apr 2007 20:27:02 GMT</pubDate></item><item><title><![CDATA[Reply to RegisterDeviceNotification --&amp;gt; NotificaionFilter --&amp;gt; ClassGUID on Fri, 06 Apr 2007 20:33:10 GMT]]></title><description><![CDATA[<p>Hmm danke, abe kenn ich schon.</p>
<p>Wenn ich mir zum Beispiel diesen Link Anschaue:<br />
<a href="http://www.ureader.com/message/3326446.aspx" rel="nofollow">http://www.ureader.com/message/3326446.aspx</a><br />
Sehe ich, dass dort ein GUID angegeben wird.</p>
<p>Aber was ist das???</p>
<p>Wofür braucht man das?</p>
<p>MFg<br />
Ace</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1260902</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1260902</guid><dc:creator><![CDATA[AceKiller73]]></dc:creator><pubDate>Fri, 06 Apr 2007 20:33:10 GMT</pubDate></item><item><title><![CDATA[Reply to RegisterDeviceNotification --&amp;gt; NotificaionFilter --&amp;gt; ClassGUID on Sat, 14 Apr 2007 14:44:53 GMT]]></title><description><![CDATA[<p>Hat nicht jemand einen Beispiel Code?<br />
Ich habe das ganze jetzt einmal in einer normale WIN32 anwendung gemacht.<br />
Dort funzt. es.</p>
<p>Im Service gibt er mir mitlerweile bei getLastError() 6 zurück.<br />
Das ist definiert mit: #define ERROR_INVALID_HANDLE 6L.</p>
<p>Allerdings, weiß ich nicht, was da das falschee Handle sein soll.</p>
<pre><code class="language-cpp">HANDLE hRegister = RegisterDeviceNotification(
        &amp;Service_status,
        &amp;NotificationFilter,
        DEVICE_NOTIFY_SERVICE_HANDLE
    );
</code></pre>
<p>Mir der der GUID hab ich immer noch nichts neues herausgefunden.</p>
<p>MFG<br />
Ace</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1265983</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1265983</guid><dc:creator><![CDATA[AceKiller73]]></dc:creator><pubDate>Sat, 14 Apr 2007 14:44:53 GMT</pubDate></item><item><title><![CDATA[Reply to RegisterDeviceNotification --&amp;gt; NotificaionFilter --&amp;gt; ClassGUID on Sun, 17 Jun 2007 06:58:45 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>ich habe eine kleine elektronische Schaltung gebastelt, die über USB mit dem PC kommuniziert. Die Windows-Anwendung verwendet das DDK. Um festzustellen, ob das Gerät angeschlossen ist oder entfernt wurde, greife ich auch auf RegisterDeviceNotification zurück.</p>
<p>Das ganze steht als Visual C++ 6.0 Projekt zum Download bereit. Es sollte nicht schwer sein, den Einsatz von RegisterDeviceNotification zu verstehen.</p>
<p>Schau dir mal die PC-Applikation zum USB-Sensor auf <a href="http://rahand.eu" rel="nofollow">rahand.eu</a> an.</p>
<p>Gruß Ralf</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1307527</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1307527</guid><dc:creator><![CDATA[Poter68]]></dc:creator><pubDate>Sun, 17 Jun 2007 06:58:45 GMT</pubDate></item></channel></rss>