<?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[Serielle Schnitstelle größer als COM8 öffnen]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich möchte über die Windows-API auch serielle Schnittstellen größer als COM8 öffnen. Bis COM8 ist das kein Problem. Ich bekomme zwar auch ein HANDLE zurück,<br />
kann die Daten jedoch nicht empfangen und versenden. Wenn ich über meine Applikation die Schnittstelle z.B COM10 öffne, kann das Windows-Terminal immer noch<br />
ohne Fehlermeldung die COM10 öffnen und empfängt auch die Daten. Wie muß ich vorgehen um auch meine Applikation zu bewegen, die COM10 exclusiv zu öffen und Daten zu empfangen?</p>
<p>Bisher habe ich folgendes zum öffnen der Schnittstelle benutzt:</p>
<pre><code>hCom = CreateFile(portname,
                  GENERIC_READ|GENERIC_WRITE,
                  0,
                  NULL,
                  OPEN_EXISTING,
                  0,
                  NULL);
</code></pre>
<p>Mit frdl. Gruß<br />
ruppi98</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/199534/serielle-schnitstelle-größer-als-com8-öffnen</link><generator>RSS for Node</generator><lastBuildDate>Tue, 28 Apr 2026 21:58:28 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/199534.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 04 Dec 2007 09:08:48 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Serielle Schnitstelle größer als COM8 öffnen on Tue, 04 Dec 2007 09:08:48 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich möchte über die Windows-API auch serielle Schnittstellen größer als COM8 öffnen. Bis COM8 ist das kein Problem. Ich bekomme zwar auch ein HANDLE zurück,<br />
kann die Daten jedoch nicht empfangen und versenden. Wenn ich über meine Applikation die Schnittstelle z.B COM10 öffne, kann das Windows-Terminal immer noch<br />
ohne Fehlermeldung die COM10 öffnen und empfängt auch die Daten. Wie muß ich vorgehen um auch meine Applikation zu bewegen, die COM10 exclusiv zu öffen und Daten zu empfangen?</p>
<p>Bisher habe ich folgendes zum öffnen der Schnittstelle benutzt:</p>
<pre><code>hCom = CreateFile(portname,
                  GENERIC_READ|GENERIC_WRITE,
                  0,
                  NULL,
                  OPEN_EXISTING,
                  0,
                  NULL);
</code></pre>
<p>Mit frdl. Gruß<br />
ruppi98</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1414626</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1414626</guid><dc:creator><![CDATA[ruppi98]]></dc:creator><pubDate>Tue, 04 Dec 2007 09:08:48 GMT</pubDate></item><item><title><![CDATA[Reply to Serielle Schnitstelle größer als COM8 öffnen on Tue, 04 Dec 2007 09:09:48 GMT]]></title><description><![CDATA[<p>Dieser Thread wurde von Moderator/in <a href="http://www.c-plusplus.net/forum/profile-var-mode-is-viewprofile-and-u-is-14774.html" rel="nofollow">akari</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum-var-f-is-2.html" rel="nofollow">VCL (C++ Builder)</a> in das Forum <a href="http://www.c-plusplus.net/forum/viewforum-var-f-is-4.html" rel="nofollow">WinAPI</a> verschoben.</p>
<p>Im Zweifelsfall bitte auch folgende Hinweise beachten:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic-var-t-is-39405.html" rel="nofollow">C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?</a></p>
<p><em>Dieses Posting wurde automatisch erzeugt.</em></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1414628</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1414628</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Tue, 04 Dec 2007 09:09:48 GMT</pubDate></item><item><title><![CDATA[Reply to Serielle Schnitstelle größer als COM8 öffnen on Tue, 04 Dec 2007 09:16:37 GMT]]></title><description><![CDATA[<p>Bin gerade auch dabei eine serielle Kommunikation herzustellen.<br />
In deinem Code ist mir halt nur aufgefallen dass ein Flag auf 0 gesetzt ist, welches eigentlich einen Wert braucht. Keine Ahnung vielleicht ist das das Problem:</p>
<pre><code>hCom = CreateFile(portname,
                  GENERIC_READ|GENERIC_WRITE,
                  0,
                  NULL,
                  OPEN_EXISTING,
                  0,      &lt;------------------
                  NULL);
</code></pre>
<p>hier die möglichen Flags die man da einstellen kann:<br />
exklusiv wäre glaube ich non-overlapped, von daher vielleicht FILE_ATTRIBUTE_NORMAL.</p>
<blockquote>
<p>dwFlagsAndAttributes - defines the file attributes and flags. Any combination of the following attributes except the FILE_ATTRIBUTE_NORMAL attribute is possible:</p>
<p>* FILE_ATTRIBUTE_ARCHIVE - the file must be archived. The applications use this attribute to mark the file for reserve copying or deletion.<br />
* FILE_ATTRIBUTE_COMPRESSED - file or catalogue is compressed . If it's a file, it means that all data in the file are compressed. If it's a catalogue it means that compression is the default value for recently created files and subdirectories.<br />
* FILE_ATTRIBUTE_HIDDEN - the file is hidden. It shouldn't be included into the usual directory list.<br />
* FILE_ATTRIBUTE_NORMAL - the file has no attributes.<br />
* FILE_ATTRIBUTE_OFFLINE - the data of the file are not available at the moment. It shows that the data of the file have been moved to an off-line archive.<br />
* FILE_ATTRIBUTE_READONLY - the file is read-only. The applications can read the file but cannot write or delete the data.<br />
* FILE_ATTRIBUTE_SYSTEM - a part of the file is used by the operation system only.<br />
* FILE_ATTRIBUTE_TEMPORARY - the file is used for temporary data storing. File systems try to keep all data in memory for quicker access rather than flushing the data back to mass archive. A temporary file should be deleted by the application as soon as it is no longer needed.</p>
<p>Also possible is any combination of the following flags:</p>
<p>* FILE_FLAG_WRITE_THROUGH<br />
* FILE_FLAG_OVERLAPPED<br />
* FILE_FLAG_NO_BUFFERING<br />
* FILE_FLAG_RANDOM_ACCESS<br />
* FILE_FLAG_SEQUENTIAL_SCAN<br />
* FILE_FLAG_DELETE_ON_CLOSE<br />
* FILE_FLAG_BACKUP_SEMANTICS<br />
* FILE_FLAG_POSIX_SEMANTICS</p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/1414634</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1414634</guid><dc:creator><![CDATA[JDHawk]]></dc:creator><pubDate>Tue, 04 Dec 2007 09:16:37 GMT</pubDate></item><item><title><![CDATA[Reply to Serielle Schnitstelle größer als COM8 öffnen on Tue, 04 Dec 2007 09:22:24 GMT]]></title><description><![CDATA[<p>Du musst als Portnamen folgende Notation verwenden:</p>
<pre><code class="language-cpp">TCHAR portname[] = _T(&quot;\\\\.\\COM10&quot;);
</code></pre>
<p>Grüsse<br />
Simon</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1414640</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1414640</guid><dc:creator><![CDATA[simon.gysi]]></dc:creator><pubDate>Tue, 04 Dec 2007 09:22:24 GMT</pubDate></item><item><title><![CDATA[Reply to Serielle Schnitstelle größer als COM8 öffnen on Tue, 04 Dec 2007 09:45:36 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>erst mal vielen Dank für die schnellen Antworten.</p>
<p>Zur Antwort von JDHawk.<br />
Die &quot;0&quot; am Parameter dwFlagsAndAttributes ist nach meiner Meinung ok, da ich kein OVERLAPPED benutzen will.</p>
<p>Ich denke also nicht, das das mein Problem ist. Trotzdem Danke.</p>
<p>Nun zur Antwort von simon.gysi:</p>
<p>Wenn ich im C++Builder Deine Anweisung compiliere bekomme ich folgende Fehlermeldung:</p>
<blockquote>
<p>[C++ Fehler] Unit1.cpp(15): E2268 Aufruf der undefinierten Funktion '_T'<br />
[C++ Fehler] Unit1.cpp(15): E2034 Konvertierung von 'int' nach 'char[]' nicht möglich</p>
</blockquote>
<p>Wo liegt hier das Problem?</p>
<p>Mit frdl. Gruß</p>
<p>ruppi98</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1414661</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1414661</guid><dc:creator><![CDATA[ruppi98]]></dc:creator><pubDate>Tue, 04 Dec 2007 09:45:36 GMT</pubDate></item><item><title><![CDATA[Reply to Serielle Schnitstelle größer als COM8 öffnen on Tue, 04 Dec 2007 09:55:53 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>habe Fehler erkannt <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /><br />
Hatt vergessen &quot;#include &quot;TCHAR.H&quot;&quot; einzubinden. <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="😞"
    /><br />
Funktioniert nun alles prima <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /> .</p>
<p>Vielen Dank an alle!!</p>
<p>ruppi98</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1414666</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1414666</guid><dc:creator><![CDATA[ruppi98]]></dc:creator><pubDate>Tue, 04 Dec 2007 09:55:53 GMT</pubDate></item></channel></rss>