<?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[Suche Schnelle Hilfe !!!!]]></title><description><![CDATA[<pre><code class="language-cpp">#include &quot;stdafx.h&quot; 
#include &lt;windows.h&gt; 
#include &lt;vector&gt;
DWORD ingameID,CurrentPlayerID; 
HANDLE ingame; 
HANDLE Process1=&quot;Diablo II1.exe&quot;;
int nr=1; 

DWORD WINAPI GetProcessId(HANDLE Process);

unsigned long pid = GetProcessId(Process1);

DWORD ReadDword(const DWORD addr)
{
HANDLE hnd = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pid);
if (NULL == hnd) return -1;
DWORD tmp=0;
ReadProcessMemory(hnd, (void *)&amp;addr , &amp;tmp, 4, NULL);
CloseHandle(hnd);
return tmp;
}

void SendPacket(BYTE* Packet,DWORD PacketSize) { 
DWORD size1 = PacketSize; 
   __asm { 
      mov eax, Packet 
      push Packet 
      mov ebx, size1 
      mov edx, 0x6FB0DE40 
      call edx 
   } 
} 

void GameMsg(char *Message, int Color) 
{ 
typedef void (_stdcall *pPrint)(wchar_t* Text, int Color); 
pPrint Print = (pPrint)0x6FAC6780; 
wchar_t Buffer[0x130]; 
MultiByteToWideChar(0, 1, Message, 100, Buffer, 100); 
Print (Buffer, Color); 
} 

void GetPlayerList(std::vector&lt;DWORD&gt; *lista); 

void GetPlayerList(std::vector&lt;DWORD&gt; *lista) 
   { 
      lista-&gt;clear(); 

      DWORD start = ReadDword(0x6FBcc33c); 
      while(start != 0) 
      { 
         lista-&gt;push_back(start); 
         start = ReadDword(start+0x10); 
      } 
   } 

DWORD WINAPI Game(LPVOID lpParameter) 
{ 
while(true) { 
   if(GetAsyncKeyState(VK_LCONTROL)) { 
   /*
   ........
   ........
   ........
   */
   } 
   if(GetAsyncKeyState(0x37)) { 
    /*
   ........
   ........
   ........
   */
   } 
SleepEx(150,true); 
} 
  return 0; 
} 

BOOL APIENTRY DllMain(HINSTANCE hInst, DWORD reason, LPVOID reserved) 
{ 
   switch(reason) 
   { 
   case DLL_PROCESS_ATTACH: 
      ingame = CreateThread(0,0,Game,0,0,&amp;ingameID); 
           GameMsg(&quot;Test Player ID&quot;,4); 
      break; 
   } 
   return TRUE; 
}
</code></pre>
<p>also beim kompilieren komme ich auf diesen fehler :</p>
<pre><code>error LNK2019: Nicht aufgeloestes externes Symbol &quot;unsigned long __stdcall GetProcessId(void *)&quot; (?GetProcessId@@YGKPAX@Z), verwiesen in Funktion _$E1

fatal error LNK1120: 1 unaufgeloeste externe Verweise
</code></pre>
<p>kann mir da jemand schnell helfen ?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/149636/suche-schnelle-hilfe</link><generator>RSS for Node</generator><lastBuildDate>Sun, 19 Jul 2026 08:18:31 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/149636.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 07 Jun 2006 23:01:33 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Suche Schnelle Hilfe !!!! on Wed, 07 Jun 2006 23:01:33 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">#include &quot;stdafx.h&quot; 
#include &lt;windows.h&gt; 
#include &lt;vector&gt;
DWORD ingameID,CurrentPlayerID; 
HANDLE ingame; 
HANDLE Process1=&quot;Diablo II1.exe&quot;;
int nr=1; 

DWORD WINAPI GetProcessId(HANDLE Process);

unsigned long pid = GetProcessId(Process1);

DWORD ReadDword(const DWORD addr)
{
HANDLE hnd = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pid);
if (NULL == hnd) return -1;
DWORD tmp=0;
ReadProcessMemory(hnd, (void *)&amp;addr , &amp;tmp, 4, NULL);
CloseHandle(hnd);
return tmp;
}

void SendPacket(BYTE* Packet,DWORD PacketSize) { 
DWORD size1 = PacketSize; 
   __asm { 
      mov eax, Packet 
      push Packet 
      mov ebx, size1 
      mov edx, 0x6FB0DE40 
      call edx 
   } 
} 

void GameMsg(char *Message, int Color) 
{ 
typedef void (_stdcall *pPrint)(wchar_t* Text, int Color); 
pPrint Print = (pPrint)0x6FAC6780; 
wchar_t Buffer[0x130]; 
MultiByteToWideChar(0, 1, Message, 100, Buffer, 100); 
Print (Buffer, Color); 
} 

void GetPlayerList(std::vector&lt;DWORD&gt; *lista); 

void GetPlayerList(std::vector&lt;DWORD&gt; *lista) 
   { 
      lista-&gt;clear(); 

      DWORD start = ReadDword(0x6FBcc33c); 
      while(start != 0) 
      { 
         lista-&gt;push_back(start); 
         start = ReadDword(start+0x10); 
      } 
   } 

DWORD WINAPI Game(LPVOID lpParameter) 
{ 
while(true) { 
   if(GetAsyncKeyState(VK_LCONTROL)) { 
   /*
   ........
   ........
   ........
   */
   } 
   if(GetAsyncKeyState(0x37)) { 
    /*
   ........
   ........
   ........
   */
   } 
SleepEx(150,true); 
} 
  return 0; 
} 

BOOL APIENTRY DllMain(HINSTANCE hInst, DWORD reason, LPVOID reserved) 
{ 
   switch(reason) 
   { 
   case DLL_PROCESS_ATTACH: 
      ingame = CreateThread(0,0,Game,0,0,&amp;ingameID); 
           GameMsg(&quot;Test Player ID&quot;,4); 
      break; 
   } 
   return TRUE; 
}
</code></pre>
<p>also beim kompilieren komme ich auf diesen fehler :</p>
<pre><code>error LNK2019: Nicht aufgeloestes externes Symbol &quot;unsigned long __stdcall GetProcessId(void *)&quot; (?GetProcessId@@YGKPAX@Z), verwiesen in Funktion _$E1

fatal error LNK1120: 1 unaufgeloeste externe Verweise
</code></pre>
<p>kann mir da jemand schnell helfen ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1073525</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1073525</guid><dc:creator><![CDATA[Woh-xD]]></dc:creator><pubDate>Wed, 07 Jun 2006 23:01:33 GMT</pubDate></item><item><title><![CDATA[Reply to Suche Schnelle Hilfe !!!! on Thu, 08 Jun 2006 06:24:28 GMT]]></title><description><![CDATA[<p>Wieso hast Du GetProcessId selbst definiert?<br />
Das müsste in der Windows.h drin sein!</p>
<p>Da Du es selbst definiert hast wird Sie als C++ Funktion interpretiert und dadurch gemangelt. Das Original ist extern &quot;C&quot;!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1073563</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1073563</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Thu, 08 Jun 2006 06:24:28 GMT</pubDate></item><item><title><![CDATA[Reply to Suche Schnelle Hilfe !!!! on Thu, 08 Jun 2006 06:41:51 GMT]]></title><description><![CDATA[<p>Woh-xD schrieb:</p>
<blockquote>
<pre><code class="language-cpp">// ...
HANDLE Process1=&quot;Diablo II1.exe&quot;;             // einem Handle eine Zeichenkette
int nr=1;                                     // zuzuweisen ist natürlich unsinn!
DWORD WINAPI GetProcessId(HANDLE Process);    // Diese Funktion existiert nicht in
                                              // der WINAPI! Du kannst sie noch so
                                              // schön deklarieren...
unsigned long pid = GetProcessId(Process1);   // Was nicht da ist, kann man nicht
                                              // aufrufen, was dir der linker auch
// mit
//     nicht aufgeloestes externes Symbol &quot;unsigned long __stdcall GetProcessId(void *)&quot;
//     (?GetProcessId@@YGKPAX@Z), verwiesen in Funktion _$E1
// zurecht ankreidet.
</code></pre>
</blockquote>
<p>Eine Funktion, welche dir die PID zu einem laufenden Prozess anhand des exe-Namens liefert<br />
musst du dir schon selbst schreiben; so zum Beispiel:</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;string&gt;

#include &lt;cstdlib&gt; // EXIT_FAILURE, EXIT_SUCCESS

#include &lt;windows.h&gt;
#include &lt;tlhelp32.h&gt;

using namespace std;

unsigned long get_pid_by_name( const string &amp;name );

int main( )
{
    unsigned long pid = get_pid_by_name( &quot;winlogon.exe&quot; );

    cout &lt;&lt; &quot;0x&quot;;
    cout.fill( '0' );
    cout.width( 6 );
    cout &lt;&lt; hex &lt;&lt; pid &lt;&lt; endl;

    return EXIT_SUCCESS;
}

unsigned long get_pid_by_name( const string &amp;name )
{
    void *snapshot = CreateToolhelp32Snapshot( TH32CS_SNAPPROCESS, 0 );

    if( snapshot == INVALID_HANDLE_VALUE )
        return 0;

    PROCESSENTRY32 proc_entry;
    proc_entry.dwSize = sizeof( PROCESSENTRY32 );

    if( !Process32First( snapshot, &amp;proc_entry ) ) {
        CloseHandle( snapshot );
        return 0;
    }

    unsigned long pid = 0;

    do {
        if( name.compare( proc_entry.szExeFile ) == 0 )
            pid = proc_entry.th32ProcessID;

        proc_entry.dwSize = sizeof( PROCESSENTRY32 );

    } while( Process32Next( snapshot, &amp;proc_entry ) &amp;&amp; ( pid == 0 ) );

    CloseHandle( snapshot );

    return pid;
}
</code></pre>
<p>Vorsicht, der Parameter von get_pid_by_name( ) ist case-sensitive! get_pid_by_name( ) liefert 0, sollte der Prozess nicht zu finden sein, also bitte nicht nach &quot;[System Process]&quot; suchen <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>Greetz, Swordfish</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1073571</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1073571</guid><dc:creator><![CDATA[Swordfish]]></dc:creator><pubDate>Thu, 08 Jun 2006 06:41:51 GMT</pubDate></item><item><title><![CDATA[Reply to Suche Schnelle Hilfe !!!! on Thu, 08 Jun 2006 06:36:36 GMT]]></title><description><![CDATA[<p>Martin Richter schrieb:</p>
<blockquote>
<p>Wieso hast Du GetProcessId selbst definiert?<br />
Das müsste in der Windows.h drin sein!</p>
</blockquote>
<p>Nö, hab' in die MSDN geguckt, die gibt's wirklich nicht.</p>
<p>Martin Richter schrieb:</p>
<blockquote>
<p>Da Du es selbst definiert hast wird Sie als C++ Funktion interpretiert und dadurch gemangelt. Das Original ist extern &quot;C&quot;!</p>
</blockquote>
<p>Das war wohl seine Verzweiflungstat, nach dem Motto &quot;dochdoch, die gibts schon...&quot;</p>
<p>Greetz, Swordfish</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1073575</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1073575</guid><dc:creator><![CDATA[Swordfish]]></dc:creator><pubDate>Thu, 08 Jun 2006 06:36:36 GMT</pubDate></item><item><title><![CDATA[Reply to Suche Schnelle Hilfe !!!! on Thu, 08 Jun 2006 07:48:49 GMT]]></title><description><![CDATA[<p>was? <a href="http://msdn.microsoft.com/library/en-us/dllproc/base/getprocessid.asp" rel="nofollow">http://msdn.microsoft.com/library/en-us/dllproc/base/getprocessid.asp</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1073622</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1073622</guid><dc:creator><![CDATA[...]]></dc:creator><pubDate>Thu, 08 Jun 2006 07:48:49 GMT</pubDate></item><item><title><![CDATA[Reply to Suche Schnelle Hilfe !!!! on Thu, 08 Jun 2006 08:03:10 GMT]]></title><description><![CDATA[<p>Lesen schadet meistens nie:</p>
<blockquote>
<p>Requires Windows &quot;Longhorn&quot; or Windows XP SP1.</p>
</blockquote>
<p>PS: Warum brauchst Du überhaupt die ProcessID???</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1073635</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1073635</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Thu, 08 Jun 2006 08:03:10 GMT</pubDate></item><item><title><![CDATA[Reply to Suche Schnelle Hilfe !!!! on Thu, 08 Jun 2006 09:28:40 GMT]]></title><description><![CDATA[<pre><code>DWORD ReadDword(const DWORD addr) 
{ 
HANDLE hnd = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pid); 
if (NULL == hnd) return -1; 
DWORD tmp=0; 
ReadProcessMemory(hnd, (void *)&amp;addr , &amp;tmp, 4, NULL); 
CloseHandle(hnd); 
return tmp; 
}
</code></pre>
<p>dafür brauche ich die Process id (pid);</p>
<p>aber ich weiß jetzt noch immer nicht wie ich die bekomme <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="😞"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1073705</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1073705</guid><dc:creator><![CDATA[Woh-xD]]></dc:creator><pubDate>Thu, 08 Jun 2006 09:28:40 GMT</pubDate></item><item><title><![CDATA[Reply to Suche Schnelle Hilfe !!!! on Thu, 08 Jun 2006 10:10:41 GMT]]></title><description><![CDATA[<p>Da wird Dir auch &quot;GetProcessId&quot; nichts helfen... den dazu brauchst Du eine Handle!</p>
<p>Denn wenn Du schon ein Handle hättest, dann bräuchtest Du die ProzessId nicht!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1073727</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1073727</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Thu, 08 Jun 2006 10:10:41 GMT</pubDate></item><item><title><![CDATA[Reply to Suche Schnelle Hilfe !!!! on Thu, 08 Jun 2006 10:56:35 GMT]]></title><description><![CDATA[<p>und wie kann ich das dann nun benutzen ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1073752</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1073752</guid><dc:creator><![CDATA[Woh-xD]]></dc:creator><pubDate>Thu, 08 Jun 2006 10:56:35 GMT</pubDate></item><item><title><![CDATA[Reply to Suche Schnelle Hilfe !!!! on Thu, 08 Jun 2006 11:23:00 GMT]]></title><description><![CDATA[<p>WAS willst Du denn benutzen??????</p>
<p>Du brauchst entweder eine<br />
- Process-ID<br />
oder ein<br />
- Process-Handle</p>
<p>wenn Du beides nicht hast, wird es halt schwierig auf den prozess zuzugreifen!!!!!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1073778</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1073778</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Thu, 08 Jun 2006 11:23:00 GMT</pubDate></item><item><title><![CDATA[Reply to Suche Schnelle Hilfe !!!! on Thu, 08 Jun 2006 11:43:04 GMT]]></title><description><![CDATA[<p>benutz das was Swordfish geposted hat das macht doch was du brauchst.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1073792</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1073792</guid><dc:creator><![CDATA[...]]></dc:creator><pubDate>Thu, 08 Jun 2006 11:43:04 GMT</pubDate></item></channel></rss>