<?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[COM Ports größer 9 lassen sich nicht öffnen]]></title><description><![CDATA[<p>Hallo,</p>
<p>Ich habe ein Problem mit einem USB Device, das sich als virtuelle COM Schnittstelle am PC anmeldet. Wird dem Gerät eine COM Schnittstelle größer 9 zugewiesen, so bekomme ich beim Aufruf der der Funktion CreateFile immer ein Invalid Handle zurück.Liegt die Schnittstellen Nummer unter 10, so ergeben sich keine Probleme.Hat jemand eine Idee, was der Grund für dieses Problem ist?<br />
Anbei die Code-Zeilen, die Probleme machen.</p>
<p>Danke für Eure Tipps.</p>
<p>LG</p>
<p>Andi</p>
<p>hComm = CreateFile( cName,<br />
GENERIC_READ | GENERIC_WRITE,<br />
0, //exclusive access<br />
NULL, //no security<br />
OPEN_EXISTING,<br />
0, //no overlapped I/O<br />
NULL); //null template</p>
<p>// IF THE PORT CANNOT BE OPENED, BAIL OUT.</p>
<p>if(hComm == INVALID_HANDLE_VALUE)<br />
{<br />
ShowMessage(&quot;COM-Port can not be opened&quot;);<br />
RS232Status_ED-&gt;Color = TS_binary1;<br />
RS232Status_ED-&gt;Text = &quot;not active&quot;;<br />
}</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/193230/com-ports-größer-9-lassen-sich-nicht-öffnen</link><generator>RSS for Node</generator><lastBuildDate>Tue, 30 Jun 2026 16:11:37 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/193230.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 24 Sep 2007 07:46:48 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to COM Ports größer 9 lassen sich nicht öffnen on Mon, 24 Sep 2007 07:46:48 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>Ich habe ein Problem mit einem USB Device, das sich als virtuelle COM Schnittstelle am PC anmeldet. Wird dem Gerät eine COM Schnittstelle größer 9 zugewiesen, so bekomme ich beim Aufruf der der Funktion CreateFile immer ein Invalid Handle zurück.Liegt die Schnittstellen Nummer unter 10, so ergeben sich keine Probleme.Hat jemand eine Idee, was der Grund für dieses Problem ist?<br />
Anbei die Code-Zeilen, die Probleme machen.</p>
<p>Danke für Eure Tipps.</p>
<p>LG</p>
<p>Andi</p>
<p>hComm = CreateFile( cName,<br />
GENERIC_READ | GENERIC_WRITE,<br />
0, //exclusive access<br />
NULL, //no security<br />
OPEN_EXISTING,<br />
0, //no overlapped I/O<br />
NULL); //null template</p>
<p>// IF THE PORT CANNOT BE OPENED, BAIL OUT.</p>
<p>if(hComm == INVALID_HANDLE_VALUE)<br />
{<br />
ShowMessage(&quot;COM-Port can not be opened&quot;);<br />
RS232Status_ED-&gt;Color = TS_binary1;<br />
RS232Status_ED-&gt;Text = &quot;not active&quot;;<br />
}</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1371362</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1371362</guid><dc:creator><![CDATA[Petsche]]></dc:creator><pubDate>Mon, 24 Sep 2007 07:46:48 GMT</pubDate></item><item><title><![CDATA[Reply to COM Ports größer 9 lassen sich nicht öffnen on Mon, 24 Sep 2007 07:52:36 GMT]]></title><description><![CDATA[<p>Setz mal \.\ vor den Dateinamen. Im Quelltext also</p>
<pre><code>\\\\.\\
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1371366</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1371366</guid><dc:creator><![CDATA[MFK]]></dc:creator><pubDate>Mon, 24 Sep 2007 07:52:36 GMT</pubDate></item><item><title><![CDATA[Reply to COM Ports größer 9 lassen sich nicht öffnen on Mon, 24 Sep 2007 08:31:36 GMT]]></title><description><![CDATA[<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /> Danke, jetzt funktionierts.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1371392</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1371392</guid><dc:creator><![CDATA[Petsche]]></dc:creator><pubDate>Mon, 24 Sep 2007 08:31:36 GMT</pubDate></item></channel></rss>