<?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[Socket Programmierung]]></title><description><![CDATA[<p>Hi, ich möchte mit einem Programm Mails automatisch versenden. Dazu wollte ich nun eigentlich über Sockets gehen. Ich hab auch ein paar Tutorials und auch 2 oder 3 Beiträge hier im Forum dazu angeschaut, kriege das Ding aber irgendwie nicht gestartet. (PS: Wenn ich ganze projekte runterlade uns starte läuft es)</p>
<pre><code class="language-cpp">include &lt;windows.h&gt;
#include &lt;iostream&gt;
#pragma comment (lib, &quot;wsock32.lib&quot;) 

using namespace std;

int startWinsock(){
	WSADATA wsa;
	short wVersionRequested ; 
	wVersionRequested = MAKEWORD (1, 0) ; 
	return WSAStartup(wVersionRequested,&amp;wsa);
}

void main(){

	if(startWinsock())
		cout &lt;&lt;&quot;ok&quot;;
}
</code></pre>
<p>so sieht das bisher aus, ich bekomme aber immer 0 zurückgeliefert...also scheint das nicht zu klappen. Seh aber keinen Unterschied zu den anderen Codebeispielen (die Versionsnummer hab ich auch schon öfters abgeändert).<br />
Muss ich da noch irgendwas im Hintergrund einstellen oder so?</p>
<p>Besten Dank schonmal</p>
<p>PS: Gibt es für c++ neuer header als windows.h?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/98414/socket-programmierung</link><generator>RSS for Node</generator><lastBuildDate>Mon, 27 Apr 2026 20:41:30 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/98414.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 19 Jan 2005 13:32:34 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Socket Programmierung on Wed, 19 Jan 2005 13:32:34 GMT]]></title><description><![CDATA[<p>Hi, ich möchte mit einem Programm Mails automatisch versenden. Dazu wollte ich nun eigentlich über Sockets gehen. Ich hab auch ein paar Tutorials und auch 2 oder 3 Beiträge hier im Forum dazu angeschaut, kriege das Ding aber irgendwie nicht gestartet. (PS: Wenn ich ganze projekte runterlade uns starte läuft es)</p>
<pre><code class="language-cpp">include &lt;windows.h&gt;
#include &lt;iostream&gt;
#pragma comment (lib, &quot;wsock32.lib&quot;) 

using namespace std;

int startWinsock(){
	WSADATA wsa;
	short wVersionRequested ; 
	wVersionRequested = MAKEWORD (1, 0) ; 
	return WSAStartup(wVersionRequested,&amp;wsa);
}

void main(){

	if(startWinsock())
		cout &lt;&lt;&quot;ok&quot;;
}
</code></pre>
<p>so sieht das bisher aus, ich bekomme aber immer 0 zurückgeliefert...also scheint das nicht zu klappen. Seh aber keinen Unterschied zu den anderen Codebeispielen (die Versionsnummer hab ich auch schon öfters abgeändert).<br />
Muss ich da noch irgendwas im Hintergrund einstellen oder so?</p>
<p>Besten Dank schonmal</p>
<p>PS: Gibt es für c++ neuer header als windows.h?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/700264</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/700264</guid><dc:creator><![CDATA[Nospherates]]></dc:creator><pubDate>Wed, 19 Jan 2005 13:32:34 GMT</pubDate></item><item><title><![CDATA[Reply to Socket Programmierung on Wed, 19 Jan 2005 13:45:21 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">int startWinsock()
{
	WSADATA wsa;//Starten von winsock, gibt 0 zurück wenn erfolgreich 
	return WSAStartup(MAKEWORD(2,0),&amp;wsa);//MAKEWORD-&gt;Version des Windowssockets,&amp;wsa-&gt;Zeiger auf wsa
}
</code></pre>
<p>reicht völlig</p>
<p>includiere mal statt</p>
<pre><code class="language-cpp">#pragma comment (lib, &quot;wsock32.lib&quot;)
</code></pre>
<p>die ws2_32.lib</p>
<pre><code class="language-cpp">#pragma comment (lib, &quot;ws2_32.lib&quot;)
</code></pre>
<p>auch unter -&gt;Projekt-&gt;Einstellungen-&gt;Linker<br />
ansonsten <a href="http://www.c-worker.ch" rel="nofollow">www.c-worker.ch</a></p>
<p>Ach ja die</p>
<pre><code class="language-cpp">#include &lt;winsock.h&gt;
</code></pre>
<p>mußte auch includeiren</p>
]]></description><link>https://www.c-plusplus.net/forum/post/700286</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/700286</guid><dc:creator><![CDATA[bigborre]]></dc:creator><pubDate>Wed, 19 Jan 2005 13:45:21 GMT</pubDate></item><item><title><![CDATA[Reply to Socket Programmierung on Wed, 19 Jan 2005 13:46:59 GMT]]></title><description><![CDATA[<p>Ach shit, sehe es jetzt erst, winsock gibt 0 zurück wenn erfolgreich, also funktioniert dein code!!!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/700287</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/700287</guid><dc:creator><![CDATA[bigborre]]></dc:creator><pubDate>Wed, 19 Jan 2005 13:46:59 GMT</pubDate></item><item><title><![CDATA[Reply to Socket Programmierung on Wed, 19 Jan 2005 13:50:41 GMT]]></title><description><![CDATA[<p>lol.. sorry... &lt;bin davon ausgegangen das 0 = false = falsch ist.. trotzdem danke ;-)... aber eine neuere header für windows.h gibts nicht?</p>
<p>gruß</p>
]]></description><link>https://www.c-plusplus.net/forum/post/700291</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/700291</guid><dc:creator><![CDATA[Nospherates]]></dc:creator><pubDate>Wed, 19 Jan 2005 13:50:41 GMT</pubDate></item><item><title><![CDATA[Reply to Socket Programmierung on Wed, 19 Jan 2005 13:57:41 GMT]]></title><description><![CDATA[<p>Nein,sonst würde dir</p>
<pre><code class="language-cpp">#include &lt;windows&gt;

using namespace std;
</code></pre>
<p>keinen Fehler bringen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/700309</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/700309</guid><dc:creator><![CDATA[bigborre]]></dc:creator><pubDate>Wed, 19 Jan 2005 13:57:41 GMT</pubDate></item><item><title><![CDATA[Reply to Socket Programmierung on Wed, 19 Jan 2005 21:11:38 GMT]]></title><description><![CDATA[<p>Dieser Thread wurde von Moderator/in <a href="http://www.c-plusplus.net/forum/profile.php?mode=viewprofile&amp;u=403" rel="nofollow">HumeSikkins</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=15" rel="nofollow">C++</a> in das Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=4" rel="nofollow">WinAPI</a> verschoben.</p>
<p>Im Zweifelsfall bitte auch folgende Hinweise beachten:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic.php?t=39405" 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/700805</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/700805</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Wed, 19 Jan 2005 21:11:38 GMT</pubDate></item><item><title><![CDATA[Reply to Socket Programmierung on Thu, 20 Jan 2005 08:01:09 GMT]]></title><description><![CDATA[<p>bigborre schrieb:</p>
<blockquote>
<p>Nein,sonst würde dir</p>
<pre><code class="language-cpp">#include &lt;windows&gt;

using namespace std;
</code></pre>
<p>keinen Fehler bringen.</p>
</blockquote>
<p>was hat der standard cpp namespace mit dem windows header zu tun <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /><br />
und imho gibt es keinen windows header ohne &quot;.h&quot;</p>
]]></description><link>https://www.c-plusplus.net/forum/post/700957</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/700957</guid><dc:creator><![CDATA[miller_m]]></dc:creator><pubDate>Thu, 20 Jan 2005 08:01:09 GMT</pubDate></item><item><title><![CDATA[Reply to Socket Programmierung on Thu, 20 Jan 2005 08:25:53 GMT]]></title><description><![CDATA[<p>richtig, die neuen header sind aber ohne .h<br />
siehe</p>
<pre><code class="language-cpp">&lt;iostream.h&gt;
&lt;iostream&gt;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/700971</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/700971</guid><dc:creator><![CDATA[bigborre]]></dc:creator><pubDate>Thu, 20 Jan 2005 08:25:53 GMT</pubDate></item><item><title><![CDATA[Reply to Socket Programmierung on Thu, 20 Jan 2005 08:41:38 GMT]]></title><description><![CDATA[<p>bigborre schrieb:</p>
<blockquote>
<p>richtig, die neuen header sind aber ohne .h<br />
siehe</p>
<pre><code class="language-cpp">&lt;iostream.h&gt;
&lt;iostream&gt;
</code></pre>
</blockquote>
<p>das bezieht sich nur auf den standard, und der hat nix mit windows zu tun.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/700979</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/700979</guid><dc:creator><![CDATA[miller_m]]></dc:creator><pubDate>Thu, 20 Jan 2005 08:41:38 GMT</pubDate></item></channel></rss>