<?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=6735&amp;type=atom" />
	<updated>2018-05-21T14:33:12Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=6735</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: определение разрядности процесса]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=125513#p125513" />
			<content type="html"><![CDATA[<p><strong>Malcev</strong><br />Спасиб!</p>]]></content>
			<author>
				<name><![CDATA[seriousstas]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32974</uri>
			</author>
			<updated>2018-05-21T14:33:12Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=125513#p125513</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: определение разрядности процесса]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=125512#p125512" />
			<content type="html"><![CDATA[<p>A_Is64bitOS.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2018-05-21T14:09:51Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=125512#p125512</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: определение разрядности процесса]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=125508#p125508" />
			<content type="html"><![CDATA[<p>Снова сравниваю с Autoit (пытаюсь перейти сюда..) ..<br />там есть такое работающие условие<br /></p><div class="codebox"><pre><code>If @OSArch = &quot;X86&quot; Then
Else
EndIf</code></pre></div><p>Из того , что пробовал выше на 64 разрядном проце и ОС - сообщает <strong>32</strong> (win 8.1 x64),<br /> кроме того , что во втором сообщении (от <strong>teadrinker</strong>) .<br />Какой метод будет работающим и оптимальным&nbsp; ?<br />Мне достаточно определить разрядность ОС</p>]]></content>
			<author>
				<name><![CDATA[seriousstas]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32974</uri>
			</author>
			<updated>2018-05-21T13:39:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=125508#p125508</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: определение разрядности процесса]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=92889#p92889" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>А зачем вы на 32-битной системе пытаетесь определить разрядность процесса?</p></blockquote></div><p>Упс, точно.<br />Я ведь сам писал, что &quot;узнать значение переменной A_Is64bitOS, и если ОС 64-х битная...&quot;<br />Пардон, забыл об этом нюансе.</p>]]></content>
			<author>
				<name><![CDATA[Aslan]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=29837</uri>
			</author>
			<updated>2015-03-31T23:53:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=92889#p92889</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: определение разрядности процесса]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=92885#p92885" />
			<content type="html"><![CDATA[<p>А зачем вы на 32-битной системе пытаетесь определить разрядность процесса?</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2015-03-31T19:58:11Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=92885#p92885</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: определение разрядности процесса]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=92883#p92883" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>YMP пишет:</cite><blockquote><p>Вот так можно:</p></blockquote></div><p>К сожалению, не работает. На XP x32 и Win7 x32 возвращает значение 64.</p>]]></content>
			<author>
				<name><![CDATA[Aslan]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=29837</uri>
			</author>
			<updated>2015-03-31T19:52:24Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=92883#p92883</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: определение разрядности процесса]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=83887#p83887" />
			<content type="html"><![CDATA[<p><strong>YMP</strong><br />Спасибо. то, что надо. Скрипт оказался несколько сложнее, чем позволяют мои скиллы, сам бы не додумался до такого )</p>]]></content>
			<author>
				<name><![CDATA[Aslan]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=29837</uri>
			</author>
			<updated>2014-06-15T18:31:31Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=83887#p83887</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: определение разрядности процесса]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=83760#p83760" />
			<content type="html"><![CDATA[<p>Вот так можно:<br /></p><div class="codebox"><pre><code>
MsgBox, % GetBitness(&quot;AutoHotkey.exe&quot;)
MsgBox, % GetBitness(&quot;Explorer.exe&quot;)

GetBitness(Process) { ; PID or Name.exe
    Process, Exist, %Process%
    If !(PID := ErrorLevel)
        return 0
    hProcess := DllCall(&quot;OpenProcess&quot;, &quot;uint&quot;, 0x400    ; PROCESS_QUERY_INFORMATION
                                     , &quot;uint&quot;, 0, &quot;uint&quot;, PID, &quot;ptr&quot;)
    If (hProcess = 0)
        return 0
    res := DllCall(&quot;IsWow64Process&quot;, &quot;ptr&quot;, hProcess, &quot;int *&quot;, Wow64Process)
    If (res = 0)
        return 0
    DllCall(&quot;CloseHandle&quot;, &quot;ptr&quot;, hProcess)
    return Wow64Process? 32:64
}
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2014-06-08T14:38:02Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=83760#p83760</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: определение разрядности процесса]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=83759#p83759" />
			<content type="html"><![CDATA[<p>А каким образом определить разрядность стороннего процесса по пути запуска или по PID?<br />Вначале можно узнать значение переменной A_Is64bitOS, и если ОС 64-х битная - то воспользоваться функцией <a href="http://www.rsdn.ru/forum/asm/3879408.all">PsGetProcessWow64Process</a>. Только вот как её вызвать - не знаю, фантазия закончилась... Или может есть более простые пути?</p>]]></content>
			<author>
				<name><![CDATA[Aslan]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=29837</uri>
			</author>
			<updated>2014-06-08T14:04:03Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=83759#p83759</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: определение разрядности процесса]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=56053#p56053" />
			<content type="html"><![CDATA[<p>Ясно, спасибо.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2012-01-27T17:39:08Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=56053#p56053</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: определение разрядности процесса]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=56052#p56052" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>Так понимаю, для написания AHK-скриптов не столь важно знать разрядность системы, достаточно определить разрядность интерпретатора с помощью <em>A_PtrSize</em>. Или я не прав?</p></blockquote></div><p>Прав, смещения в структурах обычно зависят только от размера указателя. Иногда нужно знать размер указателя в другом процессе, если работаем с его структурами(например PEB). Совсем редко нужно знать архитектуру процессора, если работаем с двоичным кодом(дизассемблируем). Разрядность ОСи мне ещё ни разу не приходилось определять, но можно её использовать для определения разрядности системных процессов.</p>]]></content>
			<author>
				<name><![CDATA[Александр_]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24888</uri>
			</author>
			<updated>2012-01-27T17:23:58Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=56052#p56052</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: определение разрядности процесса]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=56051#p56051" />
			<content type="html"><![CDATA[<p>Так понимаю, для написания AHK-скриптов не столь важно знать разрядность системы, достаточно определить разрядность интерпретатора с помощью <em>A_PtrSize</em>. Или я не прав?</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2012-01-27T16:55:36Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=56051#p56051</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: определение разрядности процесса]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=56045#p56045" />
			<content type="html"><![CDATA[<p><em>До кучи</em>:</p><div class="codebox"><pre><code>MsgBox, % &quot;OS`t&quot;(Is64bitOS() ? &quot;x64&quot;:&quot;x86&quot;)
     . &quot;`nAHK`t&quot;(A_PtrSize=8 ? &quot;x64&quot;:&quot;x86&quot;)

Is64bitOS()
{
   Return, A_PtrSize=8
   Or (DllCall(&quot;IsWow64Process&quot;, &quot;Ptr&quot;, DllCall(&quot;GetCurrentProcess&quot;)
                               , &quot;Char*&quot;, IsWow64) And IsWow64)
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Grey]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=25792</uri>
			</author>
			<updated>2012-01-27T13:33:40Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=56045#p56045</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: определение разрядности процесса]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=56044#p56044" />
			<content type="html"><![CDATA[<p>И всё же изыскания не напрасны, пример с <strong>GetSystemType()</strong> позволяет определить x64 систему при использовании 32-битной AHK.</p>]]></content>
			<author>
				<name><![CDATA[creature.ws]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26105</uri>
			</author>
			<updated>2012-01-27T13:07:39Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=56044#p56044</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: определение разрядности процесса]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=56042#p56042" />
			<content type="html"><![CDATA[<p>Да, мощно! <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2012-01-27T12:43:17Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=56042#p56042</id>
		</entry>
</feed>
