<?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[WDK Probleme bei HID USB Kommunikation]]></title><description><![CDATA[<p>Hallo,</p>
<p>Ich habe Probleme mit der Kommunikation eines USB HID-Gerätes.</p>
<p>Unter anderem habe ich das hier: <a href="http://www.c-plusplus.net/forum/viewtopic-var-p-is-446917.html" rel="nofollow">http://www.c-plusplus.net/forum/viewtopic-var-p-is-446917.html</a> schon versucht.</p>
<p>Allerdings bekomme ich immer nur den ersten Buchstaben von Device-Description und Name des CreateFiles...</p>
<p>Kann mir jemand sagen woran das liegt?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/244134/wdk-probleme-bei-hid-usb-kommunikation</link><generator>RSS for Node</generator><lastBuildDate>Fri, 03 Apr 2026 23:02:38 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/244134.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 25 Jun 2009 18:23:29 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to WDK Probleme bei HID USB Kommunikation on Thu, 25 Jun 2009 18:23:29 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>Ich habe Probleme mit der Kommunikation eines USB HID-Gerätes.</p>
<p>Unter anderem habe ich das hier: <a href="http://www.c-plusplus.net/forum/viewtopic-var-p-is-446917.html" rel="nofollow">http://www.c-plusplus.net/forum/viewtopic-var-p-is-446917.html</a> schon versucht.</p>
<p>Allerdings bekomme ich immer nur den ersten Buchstaben von Device-Description und Name des CreateFiles...</p>
<p>Kann mir jemand sagen woran das liegt?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1732848</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1732848</guid><dc:creator><![CDATA[Thor2605]]></dc:creator><pubDate>Thu, 25 Jun 2009 18:23:29 GMT</pubDate></item><item><title><![CDATA[Reply to WDK Probleme bei HID USB Kommunikation on Thu, 25 Jun 2009 20:31:17 GMT]]></title><description><![CDATA[<p>Ich hab jetzt einfach mal das Projekt auf Release gestellt und statt printf cout genommen.</p>
<p>Jetzt bekomme ich nicht mehr nur das erste Zeichen, sondern Zahlen wie 0x002F7DBC sowohl in der Device-Description als auch in dem Namen der Createfile... Ist das normal?</p>
<p>Welche lib-Datei muss ich denn unter Vista einbinden? Vielleicht liegt es ja auch daran.</p>
<p>PS: Ich benutze VC2008 und wenn ich das Projekt unter Debug kompilieren kommen RTC-Linkerfehler, wenn ich diese ignoriere, kompiliert er mir zwar das Projekt, aber ich bekomme dann beim Ausführen einen Fehler, dass die msvcirtd.dll nicht gefunden wurde!</p>
<p>Mit den libcp*.lib und libc*.lib habe ich schon rumgespielt, aber leider ohne Erfolg!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1732926</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1732926</guid><dc:creator><![CDATA[Thor2605]]></dc:creator><pubDate>Thu, 25 Jun 2009 20:31:17 GMT</pubDate></item><item><title><![CDATA[Reply to WDK Probleme bei HID USB Kommunikation on Thu, 25 Jun 2009 21:43:30 GMT]]></title><description><![CDATA[<p>diese zahlen sehen so aus als versuchtest du einen pointer auszugeben anstatt dessen inhalt.</p>
<pre><code class="language-cpp">char *test=&quot;abcdefg&quot;;
cout&lt;&lt;test&lt;&lt;endl;
</code></pre>
<p>entweder du erstellst ein anderes objekt (z.B. einen std::string für char*) oder du gehst alles in einer schleife durch.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1732978</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1732978</guid><dc:creator><![CDATA[Fencer]]></dc:creator><pubDate>Thu, 25 Jun 2009 21:43:30 GMT</pubDate></item><item><title><![CDATA[Reply to WDK Probleme bei HID USB Kommunikation on Fri, 26 Jun 2009 05:29:10 GMT]]></title><description><![CDATA[<p>Wenn ich aber den Mauszeiger beim Debuggen über die Variable lege, dann sehe ich zwar den kompletten String, allerdings ist auf dem kleinen Plus dann auch nur ein Index und zwar das des ersten Zeichens zu sehen...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1733053</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1733053</guid><dc:creator><![CDATA[Thor2605]]></dc:creator><pubDate>Fri, 26 Jun 2009 05:29:10 GMT</pubDate></item><item><title><![CDATA[Reply to WDK Probleme bei HID USB Kommunikation on Fri, 26 Jun 2009 14:09:16 GMT]]></title><description><![CDATA[<p>Kann mir wirklich niemand helfen?</p>
<p>Anbei der Code:</p>
<pre><code class="language-cpp">#include &lt;iostream.h&gt;
//#include &lt;stdio.h&gt;
#include &lt;windows.h&gt;
#include &lt;setupapi.h&gt;
extern &quot;C&quot; {
#include &lt;hidsdi.h&gt;
}

int main()
{
    PSP_DEVICE_INTERFACE_DETAIL_DATA pspdidd;
    SP_DEVICE_INTERFACE_DATA         spdid;
    SP_DEVINFO_DATA                  spdd;
    HDEVINFO                         hDevInfo;
    DWORD                            dwIndex, dwSize, dwType;
    TCHAR                            szProperty[256];
    GUID                             guid;

    ZeroMemory(&amp;spdid, sizeof(spdid));
    spdid.cbSize = sizeof(spdid);
    HidD_GetHidGuid(&amp;guid);
    hDevInfo = SetupDiGetClassDevs(&amp;guid,
                                   NULL,
                                   NULL,
                                   DIGCF_DEVICEINTERFACE | DIGCF_PRESENT);

    if(hDevInfo == INVALID_HANDLE_VALUE)
    {
        cout &lt;&lt; &quot;SetupDiGetClassDevs failed, Error &quot; &lt;&lt; GetLastError() &lt;&lt; endl;
        return(FALSE);
    }

    for(dwIndex = 0; (SetupDiEnumDeviceInterfaces(hDevInfo,
                                                  NULL,
                                                  &amp;guid,
                                                  dwIndex,
                                                  &amp;spdid)); dwIndex++)
    {
        cout &lt;&lt; &quot;Geraete-Index: &quot; &lt;&lt; dwIndex &lt;&lt; endl &lt;&lt; endl;
        dwSize = 0;

        SetupDiGetDeviceInterfaceDetail(hDevInfo,
                                        &amp;spdid,
                                        NULL,
                                        0,
                                        &amp;dwSize,
                                        NULL);

        if(dwSize)
        {
            if(NULL == (pspdidd = (PSP_DEVICE_INTERFACE_DETAIL_DATA)HeapAlloc(GetProcessHeap(),
                                                                              HEAP_ZERO_MEMORY,
                                                                              dwSize)))
                continue;

            pspdidd-&gt;cbSize = sizeof(*pspdidd);

            ZeroMemory((PVOID)&amp;spdd, sizeof(spdd));
            spdd.cbSize = sizeof(spdd);

            if(SetupDiGetDeviceInterfaceDetail(hDevInfo,
                                               &amp;spdid,
                                               pspdidd,
                                               dwSize,
                                               &amp;dwSize,
                                               &amp;spdd))
            {
                cout  &lt;&lt; &quot;Name fuer CreateFile(): &quot; &lt;&lt; pspdidd-&gt;DevicePath &lt;&lt; endl &lt;&lt; endl;
                if(SetupDiGetDeviceRegistryProperty(hDevInfo,
                                                    &amp;spdd,
                                                    SPDRP_FRIENDLYNAME,
                                                    &amp;dwType,
                                                    (PBYTE)szProperty,
                                                    sizeof(szProperty),
                                                    NULL))
                {
                    if(dwType == REG_SZ)
                    {
                        cout &lt;&lt; &quot;FriendlyName: &quot; &lt;&lt; szProperty &lt;&lt; endl &lt;&lt; endl;
                    }
                }
                if(SetupDiGetDeviceRegistryProperty(hDevInfo,
                                                    &amp;spdd,
                                                    SPDRP_DEVICEDESC,
                                                    &amp;dwType,
                                                    (PBYTE)szProperty,
                                                    sizeof(szProperty),
                                                    NULL))
                {
                    if(dwType == REG_SZ)
                    {
                        cout &lt;&lt; &quot;DeviceDescription: &quot; &lt;&lt; szProperty &lt;&lt; endl &lt;&lt; endl;
                    } } }
            HeapFree(GetProcessHeap(), 0, pspdidd);
       } }
    SetupDiDestroyDeviceInfoList(hDevInfo);
	system(&quot;pause&quot;);
    return(TRUE);
}
</code></pre>
<p>Das Projekt muss ich unter Release kompilieren, da ich sonst RTC-Linkerfehler bekomme...<br />
Wenn ich aber unter Release mit dem Mauszeiger über eine Variable gehe bekomme ich keine Informationen mehr, aber ich glaube das ist klar oder?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1733358</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1733358</guid><dc:creator><![CDATA[Thor2605]]></dc:creator><pubDate>Fri, 26 Jun 2009 14:09:16 GMT</pubDate></item><item><title><![CDATA[Reply to WDK Probleme bei HID USB Kommunikation on Thu, 02 Jul 2009 08:36:49 GMT]]></title><description><![CDATA[<p>Kann mir denn wirklich niemand helfen?</p>
<p>Bin ich der einzige, der das Problem hat?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1735857</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1735857</guid><dc:creator><![CDATA[Thor2605]]></dc:creator><pubDate>Thu, 02 Jul 2009 08:36:49 GMT</pubDate></item></channel></rss>