<?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[Fremde CPING KLasse eingebunde, aber Aufruf klappt nicht]]></title><description><![CDATA[<p>Hi,</p>
<p>ich versuche grad ein kleines PING Tool zu programmieren ;). Dazu wollte ich eine fertige KLasse CPING benutzen und hab diese bereits auch eingebunden. leider kann ich nun die eigentlich Ping-Funktion nicht aufrufen.</p>
<p>Readme:<br />
--------<br />
CPing::PingUsingICMP</p>
<p>BOOL CPing::PingUsingICMP(LPCTSTR pszHostName, CPingReply&amp; pr, UCHAR nTTL = 10, DWORD dwTimeout = 5000, UCHAR nDataSize = 32, UCHAR nTOS = 0, BOOL bDontFragment = FALSE, LPCTSTR pszLocalBoundAddress = NULL) const</p>
<p>Mein Problem liegt im 2. Paramter &quot;CPingReply&amp; pr&quot;, da hab ich keine Ahnung WAS ich da genau schreiben muß :-?</p>
<p>Readme:<br />
--------<br />
pr This is a reference to a structure which will be filled in upon successful return of this function. Currently it contains just two members, namely:</p>
<p>Address This is the IP address of the replier</p>
<p>RTT This is the round trip time in Milliseconds</p>
<p>Wenn ich z.b. mit</p>
<p>bool online=CPing::PingUsingWinsock(&quot;10.29.2.254&quot;, &amp;prt, 10, 5000,32, 0, FALSE, NULL, 0);</p>
<p>klappt es zumindest nicht muß ICH diese Structur erst anlegen und wenn ja, wie mach ich das ?</p>
<p>Danke<br />
Ray</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/65448/fremde-cping-klasse-eingebunde-aber-aufruf-klappt-nicht</link><generator>RSS for Node</generator><lastBuildDate>Fri, 05 Jun 2026 13:17:25 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/65448.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 19 Feb 2004 08:33:35 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Fremde CPING KLasse eingebunde, aber Aufruf klappt nicht on Thu, 19 Feb 2004 08:33:35 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>ich versuche grad ein kleines PING Tool zu programmieren ;). Dazu wollte ich eine fertige KLasse CPING benutzen und hab diese bereits auch eingebunden. leider kann ich nun die eigentlich Ping-Funktion nicht aufrufen.</p>
<p>Readme:<br />
--------<br />
CPing::PingUsingICMP</p>
<p>BOOL CPing::PingUsingICMP(LPCTSTR pszHostName, CPingReply&amp; pr, UCHAR nTTL = 10, DWORD dwTimeout = 5000, UCHAR nDataSize = 32, UCHAR nTOS = 0, BOOL bDontFragment = FALSE, LPCTSTR pszLocalBoundAddress = NULL) const</p>
<p>Mein Problem liegt im 2. Paramter &quot;CPingReply&amp; pr&quot;, da hab ich keine Ahnung WAS ich da genau schreiben muß :-?</p>
<p>Readme:<br />
--------<br />
pr This is a reference to a structure which will be filled in upon successful return of this function. Currently it contains just two members, namely:</p>
<p>Address This is the IP address of the replier</p>
<p>RTT This is the round trip time in Milliseconds</p>
<p>Wenn ich z.b. mit</p>
<p>bool online=CPing::PingUsingWinsock(&quot;10.29.2.254&quot;, &amp;prt, 10, 5000,32, 0, FALSE, NULL, 0);</p>
<p>klappt es zumindest nicht muß ICH diese Structur erst anlegen und wenn ja, wie mach ich das ?</p>
<p>Danke<br />
Ray</p>
]]></description><link>https://www.c-plusplus.net/forum/post/462809</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/462809</guid><dc:creator><![CDATA[rayden5_]]></dc:creator><pubDate>Thu, 19 Feb 2004 08:33:35 GMT</pubDate></item><item><title><![CDATA[Reply to Fremde CPING KLasse eingebunde, aber Aufruf klappt nicht on Thu, 19 Feb 2004 09:52:39 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>gibt es denn keine Doku oder ein Beispiel zu dieser Klasse?</p>
<p>Ansonsten scheint intuitiv klar zu sein, daß es so gehen sollte:</p>
<pre><code>CPingReply pingrep;
bool online=CPing::PingUsingWinsock(&quot;10.29.2.254&quot;, pingrep);
</code></pre>
<p>so würde ich den Prototypen verstehen (da du sowieso als restliche Argumente die Default-Werte eingesetzt hast, kann man die auch gut weglassen)</p>
<p>MfG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/462881</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/462881</guid><dc:creator><![CDATA[Probe-Nutzer]]></dc:creator><pubDate>Thu, 19 Feb 2004 09:52:39 GMT</pubDate></item><item><title><![CDATA[Reply to Fremde CPING KLasse eingebunde, aber Aufruf klappt nicht on Thu, 19 Feb 2004 12:06:40 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>Leider gibt es keine Doku über diese Structure <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="😞"
    /> Habe jetzt versucht das so einzubinden wie du sagtest und bekomme dann folgenden Fehler:</p>
<p>error C2352: 'CPing::PingUsingWinsock' : illegal call of non-static member function</p>
<p>Hm...liegt das jetzt am Aufruf oder hab ich da noch was vergessen ?</p>
<p>thx<br />
ray</p>
]]></description><link>https://www.c-plusplus.net/forum/post/463037</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/463037</guid><dc:creator><![CDATA[rayden5_]]></dc:creator><pubDate>Thu, 19 Feb 2004 12:06:40 GMT</pubDate></item><item><title><![CDATA[Reply to Fremde CPING KLasse eingebunde, aber Aufruf klappt nicht on Thu, 19 Feb 2004 12:08:09 GMT]]></title><description><![CDATA[<p>Ja, die Funktion ist nicht static <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 />
also</p>
<pre><code class="language-cpp">CPingReply pingrep; 
CPing myPing;
bool online=myPing.PingUsingWinsock(&quot;10.29.2.254&quot;, pingrep);
</code></pre>
<p>Grüße Rapha</p>
]]></description><link>https://www.c-plusplus.net/forum/post/463040</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/463040</guid><dc:creator><![CDATA[Rapha]]></dc:creator><pubDate>Thu, 19 Feb 2004 12:08:09 GMT</pubDate></item><item><title><![CDATA[Reply to Fremde CPING KLasse eingebunde, aber Aufruf klappt nicht on Thu, 19 Feb 2004 13:35:36 GMT]]></title><description><![CDATA[<p>Hi Rapha,</p>
<p>lange nix gehört <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="🙂"
    /> also jetzt klappt es *halbwegs* . Ich kann die Funktion nun aufrufen und meine bool onlie Variable wird auch mit TRUE oder FALSE gefüllt , aber diese Struktur pingresult wird nicht geüllt. Sprich sowohl ReplyAdress, RTT und Status, bleib &quot;0&quot; wenn ich mir das im Debugger anschau. Eigentlich sollte da die IP adresse, die Zeit des Pings und ebenfalls &quot;TRUE oder FALSE&quot; rein :-?</p>
<p>Hast Du eine Idee an was das liegen kann ?</p>
<p>Hab mal kleinen Teil vom Quellecode hier</p>
<pre><code>struct CPingReply
{
//Constructors / Destructors
  CPingReply();

//Member variables
	in_addr	 Address;              //The IP address of the replier
	unsigned long RTT;             //Round Trip time in Milliseconds
  unsigned long EchoReplyStatus; //here will be status of the last ping if successful
};
</code></pre>
<p>weiß nicht obs was bringt <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>thx<br />
ray</p>
]]></description><link>https://www.c-plusplus.net/forum/post/463152</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/463152</guid><dc:creator><![CDATA[rayden5_]]></dc:creator><pubDate>Thu, 19 Feb 2004 13:35:36 GMT</pubDate></item><item><title><![CDATA[Reply to Fremde CPING KLasse eingebunde, aber Aufruf klappt nicht on Thu, 19 Feb 2004 13:48:17 GMT]]></title><description><![CDATA[<p>Hm, der Syntax ist korrekt...<br />
Wo hast du die Klasse denn her?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/463164</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/463164</guid><dc:creator><![CDATA[Rapha]]></dc:creator><pubDate>Thu, 19 Feb 2004 13:48:17 GMT</pubDate></item><item><title><![CDATA[Reply to Fremde CPING KLasse eingebunde, aber Aufruf klappt nicht on Thu, 19 Feb 2004 14:23:24 GMT]]></title><description><![CDATA[<p>Die Klasse ist von eonem codeguru Mitglied bereitgestellt worden, kann man unter <a href="http://www.naughter.com/" rel="nofollow">http://www.naughter.com/</a> herunterladen. Heißt da glaub CPig 1.3.5 oder so</p>
<p>ray</p>
]]></description><link>https://www.c-plusplus.net/forum/post/463196</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/463196</guid><dc:creator><![CDATA[rayden5_]]></dc:creator><pubDate>Thu, 19 Feb 2004 14:23:24 GMT</pubDate></item><item><title><![CDATA[Reply to Fremde CPING KLasse eingebunde, aber Aufruf klappt nicht on Thu, 19 Feb 2004 16:10:26 GMT]]></title><description><![CDATA[<p>Ich rate mal...<br />
Hast du die Sockets mit WSAStartup initialisiert?</p>
<p>Grüße Rapha</p>
]]></description><link>https://www.c-plusplus.net/forum/post/463347</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/463347</guid><dc:creator><![CDATA[Rapha]]></dc:creator><pubDate>Thu, 19 Feb 2004 16:10:26 GMT</pubDate></item><item><title><![CDATA[Reply to Fremde CPING KLasse eingebunde, aber Aufruf klappt nicht on Thu, 19 Feb 2004 18:38:01 GMT]]></title><description><![CDATA[<p>Ähm nein hab ich nicht <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f921.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--clown_face"
      title=":clown:"
      alt="🤡"
    /></p>
<p>..aber davon steht in der Readme nix drin...das ding ist anscheinend sofort einsatzfähig so wie ich das verstehe <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="😞"
    /> HAst Du grad ein Tutorial oder was parat wo ich mir das mit dem WSAStartup anschauen kann <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>thx<br />
ray</p>
]]></description><link>https://www.c-plusplus.net/forum/post/463469</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/463469</guid><dc:creator><![CDATA[rayden5_]]></dc:creator><pubDate>Thu, 19 Feb 2004 18:38:01 GMT</pubDate></item><item><title><![CDATA[Reply to Fremde CPING KLasse eingebunde, aber Aufruf klappt nicht on Thu, 19 Feb 2004 18:53:36 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>schau dir mal die mitgelieferte Beispielanwendung an.</p>
<p>Den Code kannst du 1 zu 1 übernehmen <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="😉"
    /></p>
<p>Grüße Rapha</p>
]]></description><link>https://www.c-plusplus.net/forum/post/463485</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/463485</guid><dc:creator><![CDATA[Rapha]]></dc:creator><pubDate>Thu, 19 Feb 2004 18:53:36 GMT</pubDate></item><item><title><![CDATA[Reply to Fremde CPING KLasse eingebunde, aber Aufruf klappt nicht on Fri, 20 Feb 2004 09:01:14 GMT]]></title><description><![CDATA[<p>Hallo Rapha <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>So ich habe jetzt mal den Teil hier aus der Anwendung übernommen</p>
<pre><code>WSADATA wsa;
if (WSAStartup(MAKEWORD(2, 0), &amp;wsa) != 0){
      MessageBox(&quot;Failed to initialize Winsock 2 Stack&quot;);
      return false;
}

...meine Ping Funktion....

WSACLeanup();
</code></pre>
<p>Jedoch ändert das nix dara, daß diese RTT und anderen Felder der pr Struktur *leer* bleiben <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="😞"
    /> Ich habe auch schon beide Funktionen getestet die man aufrufen kann: PingUsingICMP und Ping UsingWinsock...bei beiden der gleiche Effekt. Oder muß ich da noch mehr CoOde übernehmen ?</p>
<p>Danke<br />
ray</p>
]]></description><link>https://www.c-plusplus.net/forum/post/463834</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/463834</guid><dc:creator><![CDATA[rayden5_]]></dc:creator><pubDate>Fri, 20 Feb 2004 09:01:14 GMT</pubDate></item><item><title><![CDATA[Reply to Fremde CPING KLasse eingebunde, aber Aufruf klappt nicht on Fri, 20 Feb 2004 09:13:45 GMT]]></title><description><![CDATA[<p>Funktioniert denn die Beispielanwendung (änder sie ein bisschen ab) denn mit deinen Parametern (d.h. ip-Adresse, port, blablabala)?</p>
<p>Grüße Rapha</p>
]]></description><link>https://www.c-plusplus.net/forum/post/463859</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/463859</guid><dc:creator><![CDATA[Rapha]]></dc:creator><pubDate>Fri, 20 Feb 2004 09:13:45 GMT</pubDate></item></channel></rss>