<?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 Schnittstelle( Com Port ) abfragen aber wie? ( GPS )]]></title><description><![CDATA[<p>Hallo!<br />
Ich habe ein Problem ich muß in einem Großprojekt von meiner Schule eine GPS Maus abfragen habe auch was gefunden auf dem Board wie kriege ich das Ergebnis in ein Memo1???<br />
Quelltext:</p>
<pre><code class="language-cpp">bool __fastcall TModem::OpenComm(AnsiString ComPort, DWORD BaudRate, BYTE ByteSize, BYTE Parity, BYTE StopBits)
{
    // Schnittstelle öffnen
    CommHandle=CreateFile(  ComPort.c_str(),
                            GENERIC_READ | GENERIC_WRITE,
                            0,    /* comm devices must be opened w/exclusive-access */
                            NULL, /* no security attrs */
                            OPEN_EXISTING, /* comm devices must use OPEN_EXISTING */
                            0, // no overlapped I/O
                            NULL  /* hTemplate must be NULL for comm devices */
                            );
    // Prüfen ob Schnittstelle geöffnet werden konnte
    if(CommHandle==INVALID_HANDLE_VALUE)
    {   Application-&gt;MessageBox(&quot;Fehler beim Ínitialisieren der Schnittstelle.\n\n&quot;
                                &quot;Schnittstelle nicht vorhanden, oder ein anderes\n&quot;
                                &quot;Programm hat diese noch geöffnet.&quot;,ComPort.c_str(),MB_ICONEXCLAMATION);
        return(false);
    }
    // Timeout für Read setzen damit nicht auf ein Zeichen
    // von der Schnittstelle gewartet wird
    GetCommTimeouts(CommHandle,&amp;CommTimeOut);
    CommTimeOut.ReadIntervalTimeout=MAXDWORD;
    CommTimeOut.ReadTotalTimeoutMultiplier=0;
    CommTimeOut.ReadTotalTimeoutConstant=0;
    SetCommTimeouts(CommHandle,&amp;CommTimeOut);
    SetCommMask(CommHandle,EV_RXCHAR);
    GetCommState(CommHandle,&amp;CommDCB);
    /*
        CBR_110     CBR_19200
        CBR_300     CBR_38400
        CBR_600     CBR_56000
        CBR_1200    CBR_57600
        CBR_2400    CBR_115200
        CBR_4800    CBR_128000
        CBR_9600    CBR_256000
        CBR_14400

        #define NOPARITY            0
        #define ODDPARITY           1
        #define EVENPARITY          2
        #define MARKPARITY          3
        #define SPACEPARITY         4

        #define ONESTOPBIT          0
        #define ONE5STOPBITS        1
        #define TWOSTOPBITS         2

        typedef struct _DCB
        {   DWORD DCBlength;           // sizeof(DCB)
            DWORD BaudRate;            // current baud rate
            DWORD fBinary: 1;          // binary mode, no EOF check
            DWORD fParity: 1;          // enable parity checking
            DWORD fOutxCtsFlow:1;      // CTS output flow control
            DWORD fOutxDsrFlow:1;      // DSR output flow control
            DWORD fDtrControl:2;       // DTR flow control type
            DWORD fDsrSensitivity:1;   // DSR sensitivity

            DWORD fTXContinueOnXoff:1; // XOFF continues Tx
            DWORD fOutX: 1;            // XON/XOFF out flow control
            DWORD fInX: 1;             // XON/XOFF in flow control
            DWORD fErrorChar: 1;       // enable error replacement
            DWORD fNull: 1;            // enable null stripping
            DWORD fRtsControl:2;       // RTS flow control
            DWORD fAbortOnError:1;     // abort reads/writes on error
            DWORD fDummy2:17;          // reserved
            WORD wReserved;            // not currently used

            WORD XonLim;               // transmit XON threshold
            WORD XoffLim;              // transmit XOFF threshold
            BYTE ByteSize;             // number of bits/byte, 4-8
            BYTE Parity;               // 0-4=no,odd,even,mark,space
            BYTE StopBits;             // 0,1,2 = 1, 1.5, 2
            char XonChar;              // Tx and Rx XON character
            char XoffChar;             // Tx and Rx XOFF character
            char ErrorChar;            // error replacement character

            char EofChar;              // end of input character
            char EvtChar;              // received event character
            WORD wReserved1;           // reserved; do not use
    } DCB;
    */
    CommDCB.BaudRate=BaudRate;
    CommDCB.ByteSize=ByteSize;
    CommDCB.Parity=Parity;
    CommDCB.StopBits=StopBits;
    CommDCB.fDtrControl=DTR_CONTROL_ENABLE;
    CommDCB.fRtsControl=RTS_CONTROL_ENABLE;
    SetCommState(CommHandle, &amp;CommDCB);
    PurgeComm(CommHandle,PURGE_TXABORT | PURGE_RXABORT | PURGE_TXCLEAR | PURGE_RXCLEAR);

    return(true);
}
</code></pre>
<p>Memo1-&gt;Lines-&gt;add(????????????????????????????????)</p>
<p>Danke für die Hilfe <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><strong>Edit:</strong><br />
Bitte die Code-Tags verwenden. Danke!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/119355/serielle-schnittstelle-com-port-abfragen-aber-wie-gps</link><generator>RSS for Node</generator><lastBuildDate>Sat, 25 Jul 2026 08:52:54 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/119355.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 31 Aug 2005 11:02:13 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Serielle Schnittstelle( Com Port ) abfragen aber wie? ( GPS ) on Wed, 31 Aug 2005 14:39:33 GMT]]></title><description><![CDATA[<p>Hallo!<br />
Ich habe ein Problem ich muß in einem Großprojekt von meiner Schule eine GPS Maus abfragen habe auch was gefunden auf dem Board wie kriege ich das Ergebnis in ein Memo1???<br />
Quelltext:</p>
<pre><code class="language-cpp">bool __fastcall TModem::OpenComm(AnsiString ComPort, DWORD BaudRate, BYTE ByteSize, BYTE Parity, BYTE StopBits)
{
    // Schnittstelle öffnen
    CommHandle=CreateFile(  ComPort.c_str(),
                            GENERIC_READ | GENERIC_WRITE,
                            0,    /* comm devices must be opened w/exclusive-access */
                            NULL, /* no security attrs */
                            OPEN_EXISTING, /* comm devices must use OPEN_EXISTING */
                            0, // no overlapped I/O
                            NULL  /* hTemplate must be NULL for comm devices */
                            );
    // Prüfen ob Schnittstelle geöffnet werden konnte
    if(CommHandle==INVALID_HANDLE_VALUE)
    {   Application-&gt;MessageBox(&quot;Fehler beim Ínitialisieren der Schnittstelle.\n\n&quot;
                                &quot;Schnittstelle nicht vorhanden, oder ein anderes\n&quot;
                                &quot;Programm hat diese noch geöffnet.&quot;,ComPort.c_str(),MB_ICONEXCLAMATION);
        return(false);
    }
    // Timeout für Read setzen damit nicht auf ein Zeichen
    // von der Schnittstelle gewartet wird
    GetCommTimeouts(CommHandle,&amp;CommTimeOut);
    CommTimeOut.ReadIntervalTimeout=MAXDWORD;
    CommTimeOut.ReadTotalTimeoutMultiplier=0;
    CommTimeOut.ReadTotalTimeoutConstant=0;
    SetCommTimeouts(CommHandle,&amp;CommTimeOut);
    SetCommMask(CommHandle,EV_RXCHAR);
    GetCommState(CommHandle,&amp;CommDCB);
    /*
        CBR_110     CBR_19200
        CBR_300     CBR_38400
        CBR_600     CBR_56000
        CBR_1200    CBR_57600
        CBR_2400    CBR_115200
        CBR_4800    CBR_128000
        CBR_9600    CBR_256000
        CBR_14400

        #define NOPARITY            0
        #define ODDPARITY           1
        #define EVENPARITY          2
        #define MARKPARITY          3
        #define SPACEPARITY         4

        #define ONESTOPBIT          0
        #define ONE5STOPBITS        1
        #define TWOSTOPBITS         2

        typedef struct _DCB
        {   DWORD DCBlength;           // sizeof(DCB)
            DWORD BaudRate;            // current baud rate
            DWORD fBinary: 1;          // binary mode, no EOF check
            DWORD fParity: 1;          // enable parity checking
            DWORD fOutxCtsFlow:1;      // CTS output flow control
            DWORD fOutxDsrFlow:1;      // DSR output flow control
            DWORD fDtrControl:2;       // DTR flow control type
            DWORD fDsrSensitivity:1;   // DSR sensitivity

            DWORD fTXContinueOnXoff:1; // XOFF continues Tx
            DWORD fOutX: 1;            // XON/XOFF out flow control
            DWORD fInX: 1;             // XON/XOFF in flow control
            DWORD fErrorChar: 1;       // enable error replacement
            DWORD fNull: 1;            // enable null stripping
            DWORD fRtsControl:2;       // RTS flow control
            DWORD fAbortOnError:1;     // abort reads/writes on error
            DWORD fDummy2:17;          // reserved
            WORD wReserved;            // not currently used

            WORD XonLim;               // transmit XON threshold
            WORD XoffLim;              // transmit XOFF threshold
            BYTE ByteSize;             // number of bits/byte, 4-8
            BYTE Parity;               // 0-4=no,odd,even,mark,space
            BYTE StopBits;             // 0,1,2 = 1, 1.5, 2
            char XonChar;              // Tx and Rx XON character
            char XoffChar;             // Tx and Rx XOFF character
            char ErrorChar;            // error replacement character

            char EofChar;              // end of input character
            char EvtChar;              // received event character
            WORD wReserved1;           // reserved; do not use
    } DCB;
    */
    CommDCB.BaudRate=BaudRate;
    CommDCB.ByteSize=ByteSize;
    CommDCB.Parity=Parity;
    CommDCB.StopBits=StopBits;
    CommDCB.fDtrControl=DTR_CONTROL_ENABLE;
    CommDCB.fRtsControl=RTS_CONTROL_ENABLE;
    SetCommState(CommHandle, &amp;CommDCB);
    PurgeComm(CommHandle,PURGE_TXABORT | PURGE_RXABORT | PURGE_TXCLEAR | PURGE_RXCLEAR);

    return(true);
}
</code></pre>
<p>Memo1-&gt;Lines-&gt;add(????????????????????????????????)</p>
<p>Danke für die Hilfe <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><strong>Edit:</strong><br />
Bitte die Code-Tags verwenden. Danke!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/861945</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/861945</guid><dc:creator><![CDATA[com-cat]]></dc:creator><pubDate>Wed, 31 Aug 2005 14:39:33 GMT</pubDate></item><item><title><![CDATA[Reply to Serielle Schnittstelle( Com Port ) abfragen aber wie? ( GPS ) on Wed, 31 Aug 2005 12:43:47 GMT]]></title><description><![CDATA[<p>Ich weis zwar nicht welche Komponente oder Funktion du benutzt um auf die Ser. Schnittstelle zuzugreifen, aber auch dann wäre es besser wenn du die code-tags (cpp-tag) benutzt.Ist besser zu lesen so.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/862033</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/862033</guid><dc:creator><![CDATA[Beliah]]></dc:creator><pubDate>Wed, 31 Aug 2005 12:43:47 GMT</pubDate></item><item><title><![CDATA[Reply to Serielle Schnittstelle( Com Port ) abfragen aber wie? ( GPS ) on Wed, 31 Aug 2005 13:08:50 GMT]]></title><description><![CDATA[<p>Hallo erst mal!</p>
<p>Aber wenn ich ehrlich bin wär das sicher von Vorteil, aber ich kann dir nur nen Tipp geben. Wenn du z.B. Greenleaf Commx verwenden würdest tust du dich erheblich leichter wenn's um die Serielle geht. Ich hab noch kein bequemeres Zusatztool für'n Borland gefunden. Lass mich aber gerne eines Besseren belehren.</p>
<p>Bis dann, mfg<br />
Tom</p>
]]></description><link>https://www.c-plusplus.net/forum/post/862043</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/862043</guid><dc:creator><![CDATA[Tom7]]></dc:creator><pubDate>Wed, 31 Aug 2005 13:08:50 GMT</pubDate></item><item><title><![CDATA[Reply to Serielle Schnittstelle( Com Port ) abfragen aber wie? ( GPS ) on Wed, 31 Aug 2005 13:19:39 GMT]]></title><description><![CDATA[<p>aber die komponente muß man doch kaufen ich bräuchte eine die free ist oder per Hand halt eingibt habt ihr nicht einen link oder eine beschreibung wie ich das machen kann</p>
]]></description><link>https://www.c-plusplus.net/forum/post/862055</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/862055</guid><dc:creator><![CDATA[com-cat]]></dc:creator><pubDate>Wed, 31 Aug 2005 13:19:39 GMT</pubDate></item><item><title><![CDATA[Reply to Serielle Schnittstelle( Com Port ) abfragen aber wie? ( GPS ) on Wed, 31 Aug 2005 13:32:53 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>@ com-cat :<br />
Ich weiß nicht was du da für Methoden benutzt, aber geb dir den Tip, einfach mal die Doku zu dem Gerät/dem Interface lesen, wo und in welcher Form denn nun die Nutzdaten in dem struct gelagert werden.<br />
Wenn du das weißt ist die Anzeige in einem Control kein Problem mehr.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/862066</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/862066</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Wed, 31 Aug 2005 13:32:53 GMT</pubDate></item><item><title><![CDATA[Reply to Serielle Schnittstelle( Com Port ) abfragen aber wie? ( GPS ) on Wed, 31 Aug 2005 13:48:33 GMT]]></title><description><![CDATA[<p>Greenleaf Commx := ist wirklich preislich nicht zu schlagen (jedenfalls gibt es keine teurere Komponente für die serielle Schnittstelle). Vielleicht tut es ja auch ein Blick in das Buch (oft zitiert) von Richard Kaiser &quot;C++ mit dem Borland Builder&quot;. Er beschreibt dort die Kommunikation über die serielle Schnittstelle recht gut, so daß auch ich es verstanden habe.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/862083</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/862083</guid><dc:creator><![CDATA[helder 46]]></dc:creator><pubDate>Wed, 31 Aug 2005 13:48:33 GMT</pubDate></item><item><title><![CDATA[Reply to Serielle Schnittstelle( Com Port ) abfragen aber wie? ( GPS ) on Wed, 31 Aug 2005 14:55:10 GMT]]></title><description><![CDATA[<p>ok preislich hab ich keine Ahnung von dem, da mein Vorgänger mir das Packet übergeben hat (so weit ich weiß war das mal bei irgend ner Version vom Borland mit dabei als Tool zum testen).</p>
<p>Werd mir das Buch mal zu gemüte führen und nachlesen, viell. kapier ich's ja auch.</p>
<p>mfg<br />
Tom</p>
]]></description><link>https://www.c-plusplus.net/forum/post/862141</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/862141</guid><dc:creator><![CDATA[Tom7]]></dc:creator><pubDate>Wed, 31 Aug 2005 14:55:10 GMT</pubDate></item><item><title><![CDATA[Reply to Serielle Schnittstelle( Com Port ) abfragen aber wie? ( GPS ) on Thu, 01 Sep 2005 05:04:24 GMT]]></title><description><![CDATA[<p>Ich benutze die <a href="http://reweb.fh-weingarten.de/toolbox/projekte/serial/right.htm" rel="nofollow">TSerial</a> Komponente von <a href="http://www.toolbox-mag.de/" rel="nofollow">Toolbox</a>, die ist zwar nicht umsonst aber kostet 'nur' den Preis einer <a href="http://Toolbox.Es" rel="nofollow">Toolbox.Es</a> muss natürlich die sein auf der die Komponente drauf ist. Beim ersten Link steht auf welchen Ausgaben die drauf war.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/862458</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/862458</guid><dc:creator><![CDATA[Beliah]]></dc:creator><pubDate>Thu, 01 Sep 2005 05:04:24 GMT</pubDate></item></channel></rss>