<?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[Hook-DLL: globale Variable wird NICHT von alles Funktionen erkannt&#x2F;gelesen?!]]></title><description><![CDATA[<p>hallo,</p>
<p>ich habe eine hook-dll nach folgendem beispiel:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic-var-t-is-39383.html" rel="nofollow">http://www.c-plusplus.net/forum/viewtopic-var-t-is-39383.html</a></p>
<p>es klappt auch alles, allerdings habe ich ein problem:</p>
<p>ich erstelle eine globale variable:</p>
<pre><code>char test[500];
</code></pre>
<p>in der funktion</p>
<pre><code>SetupHook(...)
</code></pre>
<p>setze ich einen wert für diese variable</p>
<p>in der funktion</p>
<pre><code>KeyboardHookProc(...)
</code></pre>
<p>ist der wert dieser variable aber nicht verhanden <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=":-/"
      alt="😕"
    /></p>
<p>warum ist das so?? das ärgert mich^^</p>
<p>könnt ihr mir sagen warum das so ist und wie ich das problem lösen kann?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/151726/hook-dll-globale-variable-wird-nicht-von-alles-funktionen-erkannt-gelesen</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Jul 2026 12:56:38 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/151726.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 28 Jun 2006 23:26:07 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Hook-DLL: globale Variable wird NICHT von alles Funktionen erkannt&#x2F;gelesen?! on Wed, 28 Jun 2006 23:26:07 GMT]]></title><description><![CDATA[<p>hallo,</p>
<p>ich habe eine hook-dll nach folgendem beispiel:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic-var-t-is-39383.html" rel="nofollow">http://www.c-plusplus.net/forum/viewtopic-var-t-is-39383.html</a></p>
<p>es klappt auch alles, allerdings habe ich ein problem:</p>
<p>ich erstelle eine globale variable:</p>
<pre><code>char test[500];
</code></pre>
<p>in der funktion</p>
<pre><code>SetupHook(...)
</code></pre>
<p>setze ich einen wert für diese variable</p>
<p>in der funktion</p>
<pre><code>KeyboardHookProc(...)
</code></pre>
<p>ist der wert dieser variable aber nicht verhanden <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=":-/"
      alt="😕"
    /></p>
<p>warum ist das so?? das ärgert mich^^</p>
<p>könnt ihr mir sagen warum das so ist und wie ich das problem lösen kann?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1087998</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1087998</guid><dc:creator><![CDATA[Babel]]></dc:creator><pubDate>Wed, 28 Jun 2006 23:26:07 GMT</pubDate></item><item><title><![CDATA[Reply to Hook-DLL: globale Variable wird NICHT von alles Funktionen erkannt&#x2F;gelesen?! on Wed, 28 Jun 2006 23:36:30 GMT]]></title><description><![CDATA[<p>Du hast die Funktionsweise von Hooks noch nicht ganz verstanden. Die DLL hat in jedem Prozess ihren eigenen Satz Variablen. Du kannst die Variable höchstens in einem shared segment unterbringen um dies zu umgehen. Das macht das Hook Beispiel auch so.</p>
<p>MfG,<br />
*Ranner*</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1088000</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1088000</guid><dc:creator><![CDATA[*Ranner*]]></dc:creator><pubDate>Wed, 28 Jun 2006 23:36:30 GMT</pubDate></item><item><title><![CDATA[Reply to Hook-DLL: globale Variable wird NICHT von alles Funktionen erkannt&#x2F;gelesen?! on Thu, 29 Jun 2006 08:26:14 GMT]]></title><description><![CDATA[<p>achso, ok das erklärt schonmal einiges ja genau das ist halt mein problem!</p>
<p>ich habe nun folgendes gemacht:</p>
<pre><code>#pragma data_seg (&quot;Shared&quot;)
HWND hWindow = 0 ;
char test[500];
#pragma data_seg ()
</code></pre>
<p>in der Funktion SetupHook(...); fülle ich diese &quot;test[500]&quot; aber in der funktion<br />
KeyboardHookProc(...); ist der Inhalt trotzdem nicht da!!</p>
<p>was mache ich falsch?</p>
<p>danke schonmal!!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1088126</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1088126</guid><dc:creator><![CDATA[Babel]]></dc:creator><pubDate>Thu, 29 Jun 2006 08:26:14 GMT</pubDate></item><item><title><![CDATA[Reply to Hook-DLL: globale Variable wird NICHT von alles Funktionen erkannt&#x2F;gelesen?! on Thu, 29 Jun 2006 09:35:33 GMT]]></title><description><![CDATA[<p>Welchen Compiler hast du? Im Borland C++Builder z.B. geht das nämlich so nicht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1088174</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1088174</guid><dc:creator><![CDATA[WebFritzi]]></dc:creator><pubDate>Thu, 29 Jun 2006 09:35:33 GMT</pubDate></item><item><title><![CDATA[Reply to Hook-DLL: globale Variable wird NICHT von alles Funktionen erkannt&#x2F;gelesen?! on Thu, 29 Jun 2006 09:50:13 GMT]]></title><description><![CDATA[<p>ich benutze Microsoft Visual C++ 6.0</p>
<p>wie würde es denn bei Borland gehen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1088183</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1088183</guid><dc:creator><![CDATA[Babel]]></dc:creator><pubDate>Thu, 29 Jun 2006 09:50:13 GMT</pubDate></item><item><title><![CDATA[Reply to Hook-DLL: globale Variable wird NICHT von alles Funktionen erkannt&#x2F;gelesen?! on Thu, 29 Jun 2006 09:54:03 GMT]]></title><description><![CDATA[<p>Mit FileMapping zum Beispiel. Aber beim VC++ 6.0 geht das auf jeden Fall. Das Problem ist also nicht der Compiler.</p>
<p>Zeig mal Code.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1088185</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1088185</guid><dc:creator><![CDATA[WebFritzi]]></dc:creator><pubDate>Thu, 29 Jun 2006 09:54:03 GMT</pubDate></item><item><title><![CDATA[Reply to Hook-DLL: globale Variable wird NICHT von alles Funktionen erkannt&#x2F;gelesen?! on Thu, 29 Jun 2006 10:22:32 GMT]]></title><description><![CDATA[<p>ja mein code ist EXACT dieser aus dem beispiel:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic-var-t-is-39383.html" rel="nofollow">http://www.c-plusplus.net/forum/viewtopic-var-t-is-39383.html</a></p>
<p>ich habe nur 3 sachen geändert:<br />
die variable &quot;test&quot; erstellt:</p>
<pre><code>#pragma data_seg (&quot;Shared&quot;)
HWND hWindow = 0 ;
char datei[500];
#pragma data_seg ()
</code></pre>
<p>in der Funktion SetupHook(...) setze ich einen wert für &quot;test&quot;</p>
<pre><code>strcpy(test,&quot;e:\\hallo.txt&quot;);
</code></pre>
<p>in der Funktion KeyboardHookProc(...) möchte ich auf diesen wert zugreifen!</p>
<pre><code>fopen_s(&amp;stream,test,&quot;a+&quot;);
</code></pre>
<p>jedoch kann die datei in der Funktion KeyboardHookProc(...) nicht geöffnet werden!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1088204</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1088204</guid><dc:creator><![CDATA[Babel]]></dc:creator><pubDate>Thu, 29 Jun 2006 10:22:32 GMT</pubDate></item><item><title><![CDATA[Reply to Hook-DLL: globale Variable wird NICHT von alles Funktionen erkannt&#x2F;gelesen?! on Thu, 29 Jun 2006 11:34:29 GMT]]></title><description><![CDATA[<p>Wieso nicht? Was gibt er als Fehler aus?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1088292</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1088292</guid><dc:creator><![CDATA[WebFritzi]]></dc:creator><pubDate>Thu, 29 Jun 2006 11:34:29 GMT</pubDate></item><item><title><![CDATA[Reply to Hook-DLL: globale Variable wird NICHT von alles Funktionen erkannt&#x2F;gelesen?! on Thu, 29 Jun 2006 11:50:01 GMT]]></title><description><![CDATA[<p>dat is auch alles keine gute idee, die keyboardproc wird doch in ganz unterschiedlichen prozessen aufgerufen wo das datei handle dann gar ned bekannt ist.</p>
<p>MfG,<br />
*Ranner*</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1088306</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1088306</guid><dc:creator><![CDATA[*Ranner*]]></dc:creator><pubDate>Thu, 29 Jun 2006 11:50:01 GMT</pubDate></item><item><title><![CDATA[Reply to Hook-DLL: globale Variable wird NICHT von alles Funktionen erkannt&#x2F;gelesen?! on Thu, 29 Jun 2006 17:02:14 GMT]]></title><description><![CDATA[<p>hmm!</p>
<p>mache ich das denn richtig? also müsste der inhalt der variable dann in allen<br />
Funktionen vorhanden sein?</p>
<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/358">@WebFritzi</a><br />
die datei kann net geöffnet werden.<br />
wenn ich den pfad der datei aber direkt in fopen() schreibe geht es!</p>
<p>danke euch</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1088566</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1088566</guid><dc:creator><![CDATA[babel]]></dc:creator><pubDate>Thu, 29 Jun 2006 17:02:14 GMT</pubDate></item><item><title><![CDATA[Reply to Hook-DLL: globale Variable wird NICHT von alles Funktionen erkannt&#x2F;gelesen?! on Thu, 29 Jun 2006 17:59:55 GMT]]></title><description><![CDATA[<p>Und wenn du test da definierst, wo du auch hWindow definierst...?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1088601</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1088601</guid><dc:creator><![CDATA[WebFritzi]]></dc:creator><pubDate>Thu, 29 Jun 2006 17:59:55 GMT</pubDate></item><item><title><![CDATA[Reply to Hook-DLL: globale Variable wird NICHT von alles Funktionen erkannt&#x2F;gelesen?! on Thu, 29 Jun 2006 19:52:52 GMT]]></title><description><![CDATA[<p>ja mache ich ja!</p>
<p>in der SetupHook(...);</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1088685</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1088685</guid><dc:creator><![CDATA[Babel]]></dc:creator><pubDate>Thu, 29 Jun 2006 19:52:52 GMT</pubDate></item><item><title><![CDATA[Reply to Hook-DLL: globale Variable wird NICHT von alles Funktionen erkannt&#x2F;gelesen?! on Thu, 29 Jun 2006 20:30:50 GMT]]></title><description><![CDATA[<p>Es wird wohl daran liegen, dass test ein Zeiger ist...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1088705</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1088705</guid><dc:creator><![CDATA[WebFritzi]]></dc:creator><pubDate>Thu, 29 Jun 2006 20:30:50 GMT</pubDate></item><item><title><![CDATA[Reply to Hook-DLL: globale Variable wird NICHT von alles Funktionen erkannt&#x2F;gelesen?! on Fri, 30 Jun 2006 07:11:36 GMT]]></title><description><![CDATA[<p>ahso...</p>
<p>und wie kann ich das problem lösen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1088824</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1088824</guid><dc:creator><![CDATA[Babel]]></dc:creator><pubDate>Fri, 30 Jun 2006 07:11:36 GMT</pubDate></item><item><title><![CDATA[Reply to Hook-DLL: globale Variable wird NICHT von alles Funktionen erkannt&#x2F;gelesen?! on Sat, 01 Jul 2006 11:06:21 GMT]]></title><description><![CDATA[<p>also das liegt daran das das ein zeiger ist?!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1089460</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1089460</guid><dc:creator><![CDATA[Babel]]></dc:creator><pubDate>Sat, 01 Jul 2006 11:06:21 GMT</pubDate></item></channel></rss>