<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: Отказать доступ к отключению процесса.]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=14506</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=14506&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Отказать доступ к отключению процесса.».]]></description>
		<lastBuildDate>Tue, 29 Jan 2019 22:26:25 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Отказать доступ к отключению процесса.]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=131768#p131768</link>
			<description><![CDATA[<p>Можно и без Loop, Files. В этой строке получают ModuleName:<br /></p><div class="codebox"><pre><code>DllCall(&quot;GetModuleFileName&quot;,&quot;PTR&quot;,hDll,&quot;PTR&quot;,&amp;ModuleName,&quot;UInt&quot;,MAX_PATH)</code></pre></div><p>а потом эта переменная нигде не используется. Можно<br /></p><div class="codebox"><pre><code>	else
	{
		hProc := DllCall(&quot;OpenProcess&quot;,&quot;UInt&quot;, PROCESS_ALL_ACCESS, &quot;Int&quot;,0,&quot;UInt&quot;, DllCall(&quot;GetCurrentProcessId&quot;),&quot;PTR&quot;)
		DllCall(&quot;GetModuleFileName&quot;,&quot;PTR&quot;,hDll,&quot;PTR&quot;,&amp;ModuleName,&quot;UInt&quot;,MAX_PATH)
		DllCall(&quot;CloseHandle&quot;,&quot;PTR&quot;,hProc)
	}
	dll := StrGet(&amp;ModuleName)</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Tue, 29 Jan 2019 22:26:25 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=131768#p131768</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Отказать доступ к отключению процесса.]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=131767#p131767</link>
			<description><![CDATA[<p>Написал&nbsp; баг репорт на оф. форуме.</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Tue, 29 Jan 2019 21:40:04 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=131767#p131767</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Отказать доступ к отключению процесса.]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=131766#p131766</link>
			<description><![CDATA[<p>В своём понял как. А этим можно создать новый отдельный поток, ну чтобы два цикла работали, ну вы меня поняли.<br /></p><div class="codebox"><pre><code>
#SingleInstance Force
#NoEnv
#Persistent 
code =
(LTrim
	
	MsgBox 1
)

if (A_Is64bitOS &amp;&amp; A_PtrSize = 4)
{
	Run, %A_AhkPath%\..\AutoHotkeyU64.exe &quot;%A_ScriptFullPath%&quot;, %A_ScriptDir%
	ExitApp
}
 
pid := DllCall(&quot;GetCurrentProcessId&quot;)

dllFile := FileExist(&quot;AutoHotkeyMini.dll&quot;) ? A_ScriptDir &quot;\AutoHotkeyMini.dll&quot;
          : (A_PtrSize = 8) ? A_ScriptDir &quot;\ahkDll\x64\AutoHotkeyMini.dll&quot;
          : A_ScriptDir &quot;\ahkDll\x32\AutoHotkeyMini.dll&quot;
		  
rThread := InjectAhkDll(pid, dllFile, &quot;&quot;)
rThread.Exec(code)
MsgBox 2
ExitApp
</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Tue, 29 Jan 2019 21:08:03 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=131766#p131766</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Отказать доступ к отключению процесса.]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=131765#p131765</link>
			<description><![CDATA[<div class="codebox"><pre><code>InjectAhkDll(PID,dll:=&quot;AutoHotkey64.dll&quot;,script:=0, deleteThread := false)
{
   static PROCESS_ALL_ACCESS:=0x1F0FFF,MEM_COMMIT := 0x1000,MEM_RELEASE:=0x8000,PAGE_EXECUTE_READWRITE:=64
   ,hKernel32:=DllCall(&quot;LoadLibrary&quot;,&quot;Str&quot;,&quot;kernel32.dll&quot;,&quot;PTR&quot;),LoadLibraryA:=DllCall(&quot;GetProcAddress&quot;,&quot;PTR&quot;,hKernel32,&quot;AStr&quot;,&quot;LoadLibraryA&quot;,&quot;PTR&quot;)
   ,FreeLibrary:=DllCall(&quot;GetProcAddress&quot;,&quot;PTR&quot;,hKernel32,&quot;AStr&quot;,&quot;FreeLibrary&quot;,&quot;PTR&quot;)
   ,TH32CS_SNAPMODULE:=0x00000008,INVALID_HANDLE_VALUE:=-1
   ,MAX_PATH:=260,MAX_MODULE_NAME32:=255,ModuleName:=&quot;&quot;,init:=VarSetCapacity(ModuleName,MAX_PATH*(A_IsUnicode?2:1))
   base:= deleteThread ? {__Call:&quot;InjectAhkDll&quot;,__Delete:&quot;InjectAhkDll&quot;} : {__Call:&quot;InjectAhkDll&quot;}

   if IsObject(PID)
   {
      if (dll!=&quot;Exec&quot; &amp;&amp; script)
         return &quot;Only Exec method can be used here!&quot;

      hProc := DllCall(&quot;OpenProcess&quot;, &quot;UInt&quot;, PROCESS_ALL_ACCESS, &quot;Int&quot;,0, &quot;UInt&quot;, PID.PID,&quot;PTR&quot;)
      if !hProc
         return &quot;Could not open process for PID: &quot; PID.PID

      if (!script) ; Free Library in remote process (object is being deleted)
      {
         ; Terminate the thread in ahkdll
         hThread := DllCall(&quot;CreateRemoteThread&quot;, &quot;PTR&quot;, hProc, &quot;PTR&quot;, 0, &quot;PTR&quot;, 0, &quot;PTR&quot;, PID.ahkTerminate, &quot;PTR&quot;, 0, &quot;UInt&quot;, 0, &quot;PTR&quot;, 0,&quot;PTR&quot;)
         DllCall(&quot;WaitForSingleObject&quot;, &quot;PTR&quot;, hThread, &quot;UInt&quot;, 0xFFFFFFFF)
         ,DllCall(&quot;CloseHandle&quot;, &quot;PTR&quot;, hThread)

         ; Free library in remote process
         hThread := DllCall(&quot;CreateRemoteThread&quot;, &quot;PTR&quot;, hProc, &quot;UInt&quot;, 0, &quot;UInt&quot;, 0, &quot;PTR&quot;, FreeLibrary, &quot;PTR&quot;, PID.hModule, &quot;UInt&quot;, 0, &quot;UInt&quot;, 0,&quot;PTR&quot;)
         DllCall(&quot;WaitForSingleObject&quot;, &quot;PTR&quot;, hThread, &quot;UInt&quot;, 0xFFFFFFFF)
         ,DllCall(&quot;CloseHandle&quot;, &quot;PTR&quot;, hThread),DllCall(&quot;CloseHandle&quot;, &quot;PTR&quot;, hProc)
         return
      }

      nScriptLength := VarSetCapacity(nScript, (StrLen(script)+1)*(A_IsUnicode?2:1), 0)
      ,StrPut(script,&amp;nScript)

      ; Reserve memory in remote process where our script will be saved
      if !pBufferRemote := DllCall(&quot;VirtualAllocEx&quot;, &quot;Ptr&quot;, hProc, &quot;Ptr&quot;, 0, &quot;PTR&quot;, nScriptLength, &quot;UInt&quot;, MEM_COMMIT, &quot;UInt&quot;, PAGE_EXECUTE_READWRITE, &quot;Ptr&quot;)
         return &quot;Could not reseve memory for process&quot;
      ,DllCall(&quot;CloseHandle&quot;, &quot;PTR&quot;, hProc)

      ; Write script to remote process memory
      DllCall(&quot;WriteProcessMemory&quot;, &quot;Ptr&quot;, hProc, &quot;Ptr&quot;, pBufferRemote, &quot;Ptr&quot;, &amp;nScript, &quot;PTR&quot;, nScriptLength, &quot;Ptr&quot;, 0)

      ; Start execution of code
      hThread := DllCall(&quot;CreateRemoteThread&quot;, &quot;PTR&quot;, hProc, &quot;PTR&quot;, 0, &quot;PTR&quot;, 0, &quot;PTR&quot;, PID.ahkExec, &quot;PTR&quot;, pBufferRemote, &quot;UInt&quot;, 0, &quot;PTR&quot;, 0,&quot;PTR&quot;)
      if !hThread
      {
         DllCall(&quot;VirtualFreeEx&quot;,&quot;PTR&quot;,hProc,&quot;PTR&quot;,pBufferRemote,&quot;PTR&quot;,nScriptLength,MEM_RELEASE)
         ,DllCall(&quot;CloseHandle&quot;, &quot;PTR&quot;, hProc)
         return &quot;Could not execute script in remote process&quot;
      }

      ; Wait for thread to finish
      DllCall(&quot;WaitForSingleObject&quot;, &quot;PTR&quot;, hThread, &quot;UInt&quot;, 0xFFFFFFFF)

      ; Get Exit code returned by ahkExec (1 = script could be executed / 0 = script could not be executed)
      DllCall(&quot;GetExitCodeThread&quot;, &quot;PTR&quot;, hThread, &quot;UIntP&quot;, lpExitCode)
      if !lpExitCode
         return &quot;Could not execute script in remote process&quot;

      DllCall(&quot;CloseHandle&quot;, &quot;PTR&quot;, hThread)
      ,DllCall(&quot;VirtualFreeEx&quot;,&quot;PTR&quot;,hProc,&quot;PTR&quot;,pBufferRemote,&quot;PTR&quot;,nScriptLength,MEM_RELEASE)
      ,DllCall(&quot;CloseHandle&quot;, &quot;PTR&quot;, hProc)
      return
   }
   else if !hDll:=DllCall(&quot;LoadLibrary&quot;,&quot;Str&quot;,dll,&quot;PTR&quot;)
      return &quot;Could not find &quot; dll &quot; library&quot;, DllCall(&quot;CloseHandle&quot;, &quot;PTR&quot;, hProc)
   else
   {
      hProc := DllCall(&quot;OpenProcess&quot;,&quot;UInt&quot;, PROCESS_ALL_ACCESS, &quot;Int&quot;,0,&quot;UInt&quot;, DllCall(&quot;GetCurrentProcessId&quot;),&quot;PTR&quot;)
      DllCall(&quot;GetModuleFileName&quot;,&quot;PTR&quot;,hDll,&quot;PTR&quot;,&amp;ModuleName,&quot;UInt&quot;,MAX_PATH)
      DllCall(&quot;CloseHandle&quot;,&quot;PTR&quot;,hProc)
   }
   ; Open Process to PID
   hProc := DllCall(&quot;OpenProcess&quot;, &quot;UInt&quot;, PROCESS_ALL_ACCESS, &quot;Int&quot;,0, &quot;UInt&quot;, PID,&quot;PTR&quot;)
   if !hProc
      return &quot;Could not open process for PID: &quot; PID
   
   Loop, Files, %dll%, F
      dll := A_LoopFileLongPath
   ; Reserve some memory and write dll path (ANSI)
   nDirLength := VarSetCapacity(nDir, StrLen(dll)+1, 0)
   ,StrPut(dll,&amp;nDir,&quot;CP0&quot;)

   ; Reserve memory in remote process
   if !pBufferRemote := DllCall(&quot;VirtualAllocEx&quot;, &quot;Ptr&quot;, hProc, &quot;Ptr&quot;, 0, &quot;PTR&quot;, nDirLength, &quot;UInt&quot;, MEM_COMMIT, &quot;UInt&quot;, PAGE_EXECUTE_READWRITE, &quot;Ptr&quot;)
      return &quot;Could not reseve memory for process&quot;, DllCall(&quot;CloseHandle&quot;, &quot;PTR&quot;, hProc)

   ; Write dll path to remote process memory
   DllCall(&quot;WriteProcessMemory&quot;, &quot;Ptr&quot;, hProc, &quot;Ptr&quot;, pBufferRemote, &quot;Ptr&quot;, &amp;nDir, &quot;PTR&quot;, nDirLength, &quot;Ptr&quot;, 0)

   ; Start new thread loading our dll

   hThread:=DllCall(&quot;CreateRemoteThread&quot;,&quot;PTR&quot;,hProc,&quot;PTR&quot;,0,&quot;PTR&quot;,0,&quot;PTR&quot;,LoadLibraryA,&quot;PTR&quot;,pBufferRemote,&quot;UInt&quot;,0,&quot;PTR&quot;,0,&quot;PTR&quot;)
   if !hThread
   {
      DllCall(&quot;VirtualFreeEx&quot;,&quot;PTR&quot;,hProc,&quot;PTR&quot;,pBufferRemote,&quot;PTR&quot;,nDirLength,&quot;Uint&quot;,MEM_RELEASE)
      ,DllCall(&quot;CloseHandle&quot;, &quot;PTR&quot;, hProc)
      return &quot;Could not load &quot; dll &quot; in remote process&quot;
   }
   ; Wait for thread to finish
   DllCall(&quot;WaitForSingleObject&quot;, &quot;PTR&quot;, hThread, &quot;UInt&quot;, 0xFFFFFFFF)

   ; Get Exit code returned by thread (HMODULE for our dll)
   DllCall(&quot;GetExitCodeThread&quot;, &quot;PTR&quot;, hThread, &quot;UInt*&quot;, hModule)

   ; Close Thread
   DllCall(&quot;CloseHandle&quot;, &quot;PTR&quot;, hThread)

   if (A_PtrSize=8)
   { ; use different method to retrieve base address because GetExitCodeThread returns DWORD only
      hModule:=0,VarSetCapacity(me32, (A_PtrSize=8?48:32)+(A_IsUnicode?1032:516), 0) ;W:1080:1064, A:564:548
      ;  Take a snapshot of all modules in the specified process.
      hModuleSnap := DllCall(&quot;CreateToolhelp32Snapshot&quot;,&quot;UInt&quot;, TH32CS_SNAPMODULE,&quot;UInt&quot;, PID, &quot;PTR&quot; )
      if ( hModuleSnap != INVALID_HANDLE_VALUE )
      {
         ; reset hModule and set the size of the structure before using it.
         NumPut((A_PtrSize=8?48:32)+(A_IsUnicode?1032:516), &amp;me32, 0, &quot;UInt&quot;) ;dwSize  ;W:1080:1064, A:564:548
         ;  Retrieve information about the first module,
         ;  and exit if unsuccessful
         if ( !DllCall(&quot;Module32First&quot; (A_IsUnicode?&quot;W&quot;:&quot;&quot;),&quot;PTR&quot;, hModuleSnap,&quot;PTR&quot;, &amp;me32 ) )
         {
            ; Free memory used for passing dll path to remote thread
            DllCall(&quot;VirtualFreeEx&quot;,&quot;PTR&quot;,hProc,&quot;PTR&quot;,pBufferRemote,&quot;PTR&quot;,nDirLength,MEM_RELEASE)
            ,DllCall(&quot;CloseHandle&quot;,&quot;PTR&quot;, hModuleSnap ) ; Must clean up the snapshot object!
            return false
         }
         ;  Now walk the module list of the process,and display information about each module
         while(A_Index=1 || DllCall(&quot;Module32Next&quot; (A_IsUnicode?&quot;W&quot;:&quot;&quot;),&quot;PTR&quot;,hModuleSnap,&quot;PTR&quot;, &amp;me32 ) )
            if (StrGet(&amp;me32+(A_PtrSize=8?48:32)+(A_IsUnicode?512:256))=dll) ;szExePath ;W:560:544, A:304:288
            {
               hModule := NumGet(me32, A_PtrSize=8?40:28, &quot;Ptr&quot;) ;hModule
               break
            }
         DllCall(&quot;CloseHandle&quot;,&quot;PTR&quot;,hModuleSnap) ; clean up
      }
   }

   hDll:=DllCall(&quot;LoadLibrary&quot;,&quot;Str&quot;,dll,&quot;PTR&quot;)

   ; Calculate pointer to ahkdll and ahkExec functions
   ahktextdll:=hModule+DllCall(&quot;GetProcAddress&quot;,&quot;PTR&quot;,hDll,&quot;AStr&quot;,&quot;ahktextdll&quot;,&quot;PTR&quot;)-hDll
   ahkExec:=hModule+DllCall(&quot;GetProcAddress&quot;,&quot;PTR&quot;,hDll,&quot;AStr&quot;,&quot;ahkExec&quot;,&quot;PTR&quot;)-hDll
   ahkTerminate:=hModule+DllCall(&quot;GetProcAddress&quot;,&quot;PTR&quot;,hDll,&quot;AStr&quot;,&quot;ahkTerminate&quot;,&quot;PTR&quot;)-hDll

   if script
   {
      nScriptLength := VarSetCapacity(nScript, (StrLen(script)+1)*(A_IsUnicode?2:1), 0)
      ,StrPut(script,&amp;nScript)
      ; Reserve memory in remote process where our script will be saved
      if !pBufferScript := DllCall(&quot;VirtualAllocEx&quot;, &quot;Ptr&quot;, hProc, &quot;Ptr&quot;, 0, &quot;PTR&quot;, nScriptLength, &quot;UInt&quot;, MEM_COMMIT, &quot;UInt&quot;, PAGE_EXECUTE_READWRITE, &quot;Ptr&quot;)
         return &quot;Could not reseve memory for process&quot;
      ,DllCall(&quot;CloseHandle&quot;, &quot;PTR&quot;, hProc)

      ; Write script to remote process memory
      DllCall(&quot;WriteProcessMemory&quot;, &quot;Ptr&quot;, hProc, &quot;Ptr&quot;, pBufferScript, &quot;Ptr&quot;, &amp;nScript, &quot;PTR&quot;, nScriptLength, &quot;Ptr&quot;, 0)
   }
   else
      pBufferScript:=0

   ; Run ahkdll function in remote thread
   hThread := DllCall(&quot;CreateRemoteThread&quot;,&quot;PTR&quot;,hProc,&quot;PTR&quot;,0,&quot;PTR&quot;,0,&quot;PTR&quot;,ahktextdll,&quot;PTR&quot;,pBufferScript,&quot;PTR&quot;,0,&quot;UInt&quot;,0,&quot;PTR&quot;)
   if !hThread
   { ; could not start ahkdll in remote process
      ; Free memory used for passing dll path to remote thread
      DllCall(&quot;VirtualFreeEx&quot;,&quot;PTR&quot;,hProc,&quot;PTR&quot;,pBufferRemote,&quot;PTR&quot;,nDirLength,MEM_RELEASE)
      DllCall(&quot;CloseHandle&quot;, &quot;PTR&quot;, hProc)
      return &quot;Could not start ahkdll in remote process&quot;
   }
   DllCall(&quot;WaitForSingleObject&quot;, &quot;PTR&quot;, hThread, &quot;UInt&quot;, 0xFFFFFFFF)
   DllCall(&quot;GetExitCodeThread&quot;, &quot;PTR&quot;, hThread, &quot;UIntP&quot;, lpExitCode)

   ; Release memory and handles
   DllCall(&quot;VirtualFreeEx&quot;,&quot;PTR&quot;,hProc,&quot;PTR&quot;,pBufferRemote,&quot;PTR&quot;,nDirLength,MEM_RELEASE)
   DllCall(&quot;CloseHandle&quot;, &quot;PTR&quot;, hThread)
   DllCall(&quot;CloseHandle&quot;, &quot;PTR&quot;, hProc)

   if !lpExitCode ; thread could not be created.
      return &quot;Could not create a thread in remote process&quot;

   return {PID:PID,hModule:hModule,ahkExec:ahkExec,ahkTerminate:ahkTerminate,base:base}
}</code></pre></div><p>Ликбез пока не могу, работы завал.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Tue, 29 Jan 2019 21:07:55 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=131765#p131765</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Отказать доступ к отключению процесса.]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=131764#p131764</link>
			<description><![CDATA[<p>Новую версию InjectAhkDll можешь привести, и небольшой ликбез: эта штука может выполнить динамичный код анк в новом процессе и в своём.</p>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Tue, 29 Jan 2019 20:55:33 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=131764#p131764</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Отказать доступ к отключению процесса.]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=131763#p131763</link>
			<description><![CDATA[<p>Скорее всего из-за этой строки:<br /></p><div class="codebox"><pre><code>if (StrGet(&amp;me32+(A_PtrSize=8?48:32)+(A_IsUnicode?512:256))=dll)</code></pre></div><p>StrGet возвращает полные пути.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Tue, 29 Jan 2019 20:45:48 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=131763#p131763</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Отказать доступ к отключению процесса.]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=131762#p131762</link>
			<description><![CDATA[<p>А в чем причина такого поведения на x64?</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Tue, 29 Jan 2019 20:30:54 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=131762#p131762</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Отказать доступ к отключению процесса.]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=131761#p131761</link>
			<description><![CDATA[<p>Добавьте:<br /></p><div class="codebox"><pre><code>   Loop, Files, %dll%, F
      dll := A_LoopFileLongPath
   ; Reserve some memory and write dll path (ANSI)
   nDirLength := VarSetCapacity(nDir, StrLen(dll)+1, 0)
   ,StrPut(dll,&amp;nDir,&quot;CP0&quot;)</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Tue, 29 Jan 2019 20:12:49 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=131761#p131761</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Отказать доступ к отключению процесса.]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=131760#p131760</link>
			<description><![CDATA[<p>Да, у меня тоже крашит, наверно баг в функции, потом посмотрю.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Tue, 29 Jan 2019 20:04:41 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=131760#p131760</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Отказать доступ к отключению процесса.]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=131759#p131759</link>
			<description><![CDATA[<p>Значит, выходит, что баг.</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Tue, 29 Jan 2019 19:48:00 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=131759#p131759</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Отказать доступ к отключению процесса.]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=131758#p131758</link>
			<description><![CDATA[<p>Крашит.<br />У меня в примере &quot;\ahkDll\x64\AutoHotkeyMini.dll&quot; надо было убрать &quot;\&quot; в начале.</p>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Tue, 29 Jan 2019 19:46:53 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=131758#p131758</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Отказать доступ к отключению процесса.]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=131757#p131757</link>
			<description><![CDATA[<p><strong>teadrinker</strong>, а если полный путь не указывать, то у тебя крашит?</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Tue, 29 Jan 2019 19:43:51 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=131757#p131757</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Отказать доступ к отключению процесса.]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=131756#p131756</link>
			<description><![CDATA[<p>InjectAhkDll от <strong>teadrinker</strong>.</p><div class="codebox"><pre><code>#SingleInstance Force
#NoEnv
#Persistent 
code =
(LTrim
	SetWorkingDir, %A_ScriptDir%
	#Include %A_ScriptDir%\Lib\MinHook.ahk

	hook1 := New MinHook(&quot;user32.dll&quot;, &quot;SetDlgItemTextW&quot;, &quot;SetDlgItemTextW_Hook&quot;)
	hook1.Enable()
	return
	
	
	
	SetDlgItemTextW_Hook(hDlg, nIDDlgItem, lpString) {
		global hook1
		return DllCall(hook1.original, &quot;ptr&quot;, hDlg, &quot;int&quot;, nIDDlgItem, &quot;str&quot;, &quot;Hello ^_^&quot;)
	}
)

if (A_Is64bitOS &amp;&amp; A_PtrSize = 4)
{
	Run, %A_AhkPath%\..\AutoHotkeyU64.exe &quot;%A_ScriptFullPath%&quot;, %A_ScriptDir%
	ExitApp
}

Run, notepad,,, pid
WinWait, ahk_pid %pid%

dllFile := FileExist(&quot;AutoHotkeyMini.dll&quot;) ?  &quot;\AutoHotkeyMini.dll&quot;
          : (A_PtrSize = 8)                  ?  &quot;\ahkDll\x64\AutoHotkeyMini.dll&quot;
          :  &quot;\ahkDll\x32\AutoHotkeyMini.dll&quot;
rThread := InjectAhkDll(pid, dllFile, &quot;&quot;)
rThread.Exec(code) 
WinMenuSelectItem,,, 5&amp;, 3&amp;
return</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Tue, 29 Jan 2019 19:42:55 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=131756#p131756</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Отказать доступ к отключению процесса.]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=131755#p131755</link>
			<description><![CDATA[<p>У меня не крашит, но и не работает хук.</p>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Tue, 29 Jan 2019 19:41:21 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=131755#p131755</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Отказать доступ к отключению процесса.]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=131754#p131754</link>
			<description><![CDATA[<p>Нет, я полный путь к dll указывал.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Tue, 29 Jan 2019 19:40:38 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=131754#p131754</guid>
		</item>
	</channel>
</rss>
