<?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[Problem mit CreateFile]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich habe folgenden Quellcode:</p>
<pre><code class="language-cpp">#include &lt;windows.h&gt;

int APIENTRY WinMain(HINSTANCE	hInstance,
					 HINSTANCE	hPrevInstance,
					 LPSTR		lpCmdLine,
					 int		nCmdShow)

{
	HANDLE hFile; 
	int Daten;
	Daten = 1;
	DWORD Readd;

	hFile = CreateFile(&quot;c:\\int.dat&quot;, GENERIC_WRITE, 0,
		NULL, CREATE_ALWAYS, NULL, NULL);
	WriteFile(hFile,&amp;Daten,sizeof(Daten),&amp;Readd,NULL);
	CloseHandle(hFile);

	return 0;
}
</code></pre>
<p>und bekomme leider folgende Fehlermeldung:</p>
<pre><code>IBCD.lib(crt0.obj) : error LNK2001: Nichtaufgeloestes externes Symbol _main
Debug/test createfile.exe : fatal error LNK1120: 1 unaufgeloeste externe Verweise
Fehler beim Ausführen von link.exe.
</code></pre>
<p>kann mir jemand sagen, was ich hier falsch gemacht habe?</p>
<p>Viele Grüße,<br />
Arwen</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/83532/problem-mit-createfile</link><generator>RSS for Node</generator><lastBuildDate>Fri, 17 Apr 2026 13:56:21 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/83532.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 21 Aug 2004 19:34:39 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problem mit CreateFile on Sat, 21 Aug 2004 19:34:39 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich habe folgenden Quellcode:</p>
<pre><code class="language-cpp">#include &lt;windows.h&gt;

int APIENTRY WinMain(HINSTANCE	hInstance,
					 HINSTANCE	hPrevInstance,
					 LPSTR		lpCmdLine,
					 int		nCmdShow)

{
	HANDLE hFile; 
	int Daten;
	Daten = 1;
	DWORD Readd;

	hFile = CreateFile(&quot;c:\\int.dat&quot;, GENERIC_WRITE, 0,
		NULL, CREATE_ALWAYS, NULL, NULL);
	WriteFile(hFile,&amp;Daten,sizeof(Daten),&amp;Readd,NULL);
	CloseHandle(hFile);

	return 0;
}
</code></pre>
<p>und bekomme leider folgende Fehlermeldung:</p>
<pre><code>IBCD.lib(crt0.obj) : error LNK2001: Nichtaufgeloestes externes Symbol _main
Debug/test createfile.exe : fatal error LNK1120: 1 unaufgeloeste externe Verweise
Fehler beim Ausführen von link.exe.
</code></pre>
<p>kann mir jemand sagen, was ich hier falsch gemacht habe?</p>
<p>Viele Grüße,<br />
Arwen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/587973</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/587973</guid><dc:creator><![CDATA[Arwen]]></dc:creator><pubDate>Sat, 21 Aug 2004 19:34:39 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit CreateFile on Sat, 21 Aug 2004 20:00:02 GMT]]></title><description><![CDATA[<p>Du hast beim erstellen deines Projekts eine Win32-Konsolenanwendung ausgewählt. Dort ist main der standardmässige Einsprungspunkt. Für WinMain musst du eine Win32-Anwendung erstellen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/587979</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/587979</guid><dc:creator><![CDATA[D*niel *chumann]]></dc:creator><pubDate>Sat, 21 Aug 2004 20:00:02 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit CreateFile on Sat, 21 Aug 2004 20:13:42 GMT]]></title><description><![CDATA[<p>Danke! Ja, das war das Problem, jetzt geht es :).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/587990</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/587990</guid><dc:creator><![CDATA[Arwen]]></dc:creator><pubDate>Sat, 21 Aug 2004 20:13:42 GMT</pubDate></item></channel></rss>