<?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[char in unsigned int]]></title><description><![CDATA[<pre><code class="language-cpp">LRESULT CALLBACK HookedWindowProcedure(HWND hwnd,UINT message,WPARAM wParam,LPARAM 
lParam)

char se[256];
char lo[256];
char la[256];
GetModuleFileName(handle_module, se, sizeof(se));
if (strchr(strchr(se,92),92) != NULL) *strrchr(se,92) = '\0';
sprintf(lo, &quot;%s\\Settings.ini&quot;, se); 
GetPrivateProfileString(&quot;Key&quot;, &quot;KeyON&quot;, NULL, la, sizeof(la), lo);

{

	switch(message)
	{
		case WM_KEYDOWN:
		{

			if(wParam==bla) {
				MessageBox(0, &quot;test&quot;, &quot;&quot;, 32);
			}

.....
</code></pre>
<pre><code>error C2446: '==' : no conversion from 'char *' to 'unsigned int'
</code></pre>
<p>Wie kann ich ein char * in ein unsigned int konvertieren?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/135227/char-in-unsigned-int</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Jul 2026 12:37:55 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/135227.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 31 Jan 2006 17:39:21 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to char in unsigned int on Tue, 31 Jan 2006 17:39:21 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">LRESULT CALLBACK HookedWindowProcedure(HWND hwnd,UINT message,WPARAM wParam,LPARAM 
lParam)

char se[256];
char lo[256];
char la[256];
GetModuleFileName(handle_module, se, sizeof(se));
if (strchr(strchr(se,92),92) != NULL) *strrchr(se,92) = '\0';
sprintf(lo, &quot;%s\\Settings.ini&quot;, se); 
GetPrivateProfileString(&quot;Key&quot;, &quot;KeyON&quot;, NULL, la, sizeof(la), lo);

{

	switch(message)
	{
		case WM_KEYDOWN:
		{

			if(wParam==bla) {
				MessageBox(0, &quot;test&quot;, &quot;&quot;, 32);
			}

.....
</code></pre>
<pre><code>error C2446: '==' : no conversion from 'char *' to 'unsigned int'
</code></pre>
<p>Wie kann ich ein char * in ein unsigned int konvertieren?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/982303</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/982303</guid><dc:creator><![CDATA[cs]]></dc:creator><pubDate>Tue, 31 Jan 2006 17:39:21 GMT</pubDate></item><item><title><![CDATA[Reply to char in unsigned int on Tue, 31 Jan 2006 17:51:02 GMT]]></title><description><![CDATA[<pre><code>char *a = (char*)0;
unsigned int b = (unsigned int)a; // &lt;--- so
</code></pre>
<p>vorausgesetzt dass deine char* auch in ein int passen, was aber bei windoofs der fall ist.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/982313</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/982313</guid><dc:creator><![CDATA[net 0]]></dc:creator><pubDate>Tue, 31 Jan 2006 17:51:02 GMT</pubDate></item><item><title><![CDATA[Reply to char in unsigned int on Tue, 31 Jan 2006 18:10:35 GMT]]></title><description><![CDATA[<p>atoi()</p>
]]></description><link>https://www.c-plusplus.net/forum/post/982342</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/982342</guid><dc:creator><![CDATA[qasdfgh]]></dc:creator><pubDate>Tue, 31 Jan 2006 18:10:35 GMT</pubDate></item><item><title><![CDATA[Reply to char in unsigned int on Tue, 31 Jan 2006 20:00:00 GMT]]></title><description><![CDATA[<p>Ich hooke ein Fenster, dass bei einer Stringkonvertierung nicht mehr reagiert bzw. scheint die Funktion &quot;GetAsyncKeyState&quot; nicht mehr zu funktionieren.</p>
<pre><code class="language-cpp">char gModule[256], gName[256], sName[256];
GetModuleFileName(handle_module, gModule, sizeof(gModule));
if (strchr(strchr(gModule,92),92) != NULL) *strrchr(gModule,92) = '\0'; 
sprintf(gName, &quot;%s\\Settings.ini&quot;, gModule);
GetPrivateProfileString(&quot;Key&quot;, &quot;KeyON&quot;, NULL, sName, sizeof(sName), gName);
</code></pre>
<pre><code>if(GetAsyncKeystate(sName)&amp;1==1) {
MessageBox(0, &quot;hi&quot;, &quot;&quot;, 32);
}
</code></pre>
<p>Da kommt wieder der selbe mist - das ich den string zu einem int konvertieren muss. Jedoch funktioniert weder atoi noch die konvertierung von &quot;net&quot;. Wie kann ich am besten von einer INI die taste auslesen? gibt dazu irgendwo ein beispiel?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/982477</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/982477</guid><dc:creator><![CDATA[cs]]></dc:creator><pubDate>Tue, 31 Jan 2006 20:00:00 GMT</pubDate></item><item><title><![CDATA[Reply to char in unsigned int on Tue, 31 Jan 2006 22:23:57 GMT]]></title><description><![CDATA[<p>GetAsyncKeystate() erwartet meines Wissens nach einen Int-wert.<br />
Du fütterst die Funktion allerdings mit einem Characterarray.</p>
<p>int intvar = (int) sName[index];</p>
<p>Das sollte funktionieren.</p>
<p>Im Zweifelsfall ein Element aus sName in eine einfache Character Variable speichern und diese konvertieren.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/982609</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/982609</guid><dc:creator><![CDATA[Mindphreaker]]></dc:creator><pubDate>Tue, 31 Jan 2006 22:23:57 GMT</pubDate></item><item><title><![CDATA[Reply to char in unsigned int on Wed, 01 Feb 2006 02:28:58 GMT]]></title><description><![CDATA[<p>Kann VK_NUMPAD1 angeben das ist aber kein Integer=?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/982657</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/982657</guid><dc:creator><![CDATA[cs]]></dc:creator><pubDate>Wed, 01 Feb 2006 02:28:58 GMT</pubDate></item><item><title><![CDATA[Reply to char in unsigned int on Wed, 01 Feb 2006 07:54:34 GMT]]></title><description><![CDATA[<p>das ist eine definierte konstante und kein string, im prinzip steht dahinter auch wieder eine zahl. wenn du nach der deklaration suchst wirste finden welcher wert das ist.</p>
<p>MfG RadiatioN</p>
]]></description><link>https://www.c-plusplus.net/forum/post/982716</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/982716</guid><dc:creator><![CDATA[Radiation2K5]]></dc:creator><pubDate>Wed, 01 Feb 2006 07:54:34 GMT</pubDate></item></channel></rss>