<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Чтение памяти]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=16263&amp;type=atom" />
	<updated>2021-04-15T22:21:03Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=16263</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Чтение памяти]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=147356#p147356" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>T1ran пишет:</cite><blockquote><p>Подскажите пожалуйста как правильно оформить.</p></blockquote></div><p><strong>T1ran</strong>, зависит от того, какой результат вы хотите получить. Код, который вы используете, выглядит устаревшим и частично некорректным. Если хотите прочитать значение, равное 4 байтам, такой код должен сработать:<br /></p><div class="codebox"><pre><code>ReadMemory(addr, PID)
{
   hProcess := DllCall(&quot;OpenProcess&quot;, &quot;UInt&quot;, PROCESS_VM_READ := 0x10, &quot;UInt&quot;, false, &quot;UInt&quot;, PID, &quot;Ptr&quot;)
   DllCall(&quot;ReadProcessMemory&quot;, &quot;Ptr&quot;, hProcess, &quot;Ptr&quot;, addr, &quot;UIntP&quot;, value, &quot;Ptr&quot;, 4, &quot;PtrP&quot;, read)
   DllCall(&quot;CloseHandle&quot;, &quot;Ptr&quot;, hProcess)
   Return value
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2021-04-15T22:21:03Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=147356#p147356</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Чтение памяти]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=147352#p147352" />
			<content type="html"><![CDATA[<p><strong>ypppu</strong><br />Спасибо, исправил тему</p>]]></content>
			<author>
				<name><![CDATA[T1ran]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40693</uri>
			</author>
			<updated>2021-04-15T17:10:07Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=147352#p147352</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Чтение памяти]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=147349#p147349" />
			<content type="html"><![CDATA[<p><span style="color: green"><strong>T1ran</strong>, языком конференции является русский. Исправьте!</span></p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2021-04-15T14:10:45Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=147349#p147349</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Чтение памяти]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=147348#p147348" />
			<content type="html"><![CDATA[<p>Здравствуйте друзья! У меня возникли проблемы с чтением памяти, а именно с одной строчкой:<br /></p><div class="codebox"><pre><code>duck: = ReadMemory(offset_1 + offset_2 + (i * 0x10) &amp; 0xFFF, PID, ProcessHandle)</code></pre></div><p>Проблема заключается в том что не работает - </p><div class="codebox"><pre><code>&amp; 0xFFF</code></pre></div><p>Вот функция чтения памяти которую я использую:<br /></p><div class="codebox"><pre><code>ProcessHandle: = DllCall(&quot;OpenProcess&quot;, &quot;int&quot;, 2035711, &quot;char&quot;, 0, &quot;UInt&quot;, PID, &quot;UInt&quot;)</code></pre></div><p>а также:<br /></p><div class="codebox"><pre><code>ReadMemory(MADDRESS, PID = 0, ProcessHandle = -1)
{
VarSetCapacity(MVALUE, 4.0)
DllCall(&quot;ReadProcessMemory&quot;, &quot;UInt&quot;, ProcessHandle, &quot;UInt&quot;, MADDRESS, &quot;Str&quot;, MVALUE, &quot;UInt&quot;, 4, &quot;UInt *&quot;, 0)
Loop 4
result + = *(&amp; MVALUE + A_Index-1) &lt;&lt; 8 *(A_Index-1)
SetFormat, Integer, D
return, result
}</code></pre></div><p>Подскажите пожалуйста как правильно оформить.</p>]]></content>
			<author>
				<name><![CDATA[T1ran]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40693</uri>
			</author>
			<updated>2021-04-15T13:08:10Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=147348#p147348</id>
		</entry>
</feed>
