Search found 705 matches

by malcev
04 Feb 2019, 19:27
Forum: Scripts and Functions
Topic: AhkHook: API hooking with autohotkey
Replies: 50
Views: 45610

Re: AhkHook: API hooking with autohotkey

Peixoto , I have written code for getting address of directx EndScene method. How can I inject this code and make hook in running application with Your library? d3d := Direct3DCreate9(D3D_SDK_VERSION := 32) VarSetCapacity(D3DPRESENT_PARAMETERS, 48+2*A_PtrSize, 0) NumPut(1, D3DPRESENT_PARAMETERS, 0)...
by malcev
30 Jan 2019, 06:33
Forum: Scripts and Functions
Topic: MinHook - API Hooking Library
Replies: 19
Views: 6751

Re: MinHook - API Hooking Library

I have done like this, I can hook endscene method but program hangs after that. Do not know why. Here is 32 bit program (do not need install): https://files.fm/u/xast7cz4 Inject autohotkey.dll like this: f11:: WinGet, PID, PID, A FileRead,HookScript,minhook.ahk rThread:="" rThread:=InjectAhkDll(PID,...
by malcev
29 Jan 2019, 19:45
Forum: AutoHotkey_H
Topic: [AHK v1] Bug: InjectAhkDll() crashes target process on x64 without full path to AutoHotkey.dll
Replies: 10
Views: 2894

Re: [AHK v1] Bug: InjectAhkDll() crashes target process on x64 without full path to AutoHotkey.dll

This Your code also does not work: https://autohotkey.com/board/topic/85304-solvedget-other-processs-working-dir/page-4 It does nothing on x64 and hangs other process on x32. Can You please correct it? Thank You! Main Script for AutoHotkey.exe : Process,Exist, notepad.exe If !PID:=ErrorLevel Run not...
by malcev
29 Jan 2019, 16:36
Forum: AutoHotkey_H
Topic: [AHK v1] Bug: InjectAhkDll() crashes target process on x64 without full path to AutoHotkey.dll
Replies: 10
Views: 2894

[AHK v1] Bug: InjectAhkDll() crashes target process on x64 without full path to AutoHotkey.dll

https://autohotkey.com/board/topic/85304-solvedget-other-processs-working-dir/page-3#entry544650 If We run this script without entering full path to AutoHotkey.dll then target program will crash on x64 bit. Tested on AHK_L. Does not work: Run notepad.exe,,,PID rThread:=InjectAhkDll(PID, "AutoHotkey...
by malcev
27 Jan 2019, 19:25
Forum: Scripts and Functions
Topic: MinHook - API Hooking Library
Replies: 19
Views: 6751

Re: MinHook - API Hooking Library

tmplinshi, do not You know how can I hook directx endscene method, as it written here:
http://spazzarama.com/2010/03/29/screen-capture-with-direct3d-api-hooks
by malcev
22 Jan 2019, 08:18
Forum: Ask For Help
Topic: Is it possible to call c++ class methods from dll with AHK?
Replies: 1
Views: 698

Is it possible to call c++ class methods from dll with AHK?

I want to call this c++ method from dll: § imread() Mat cv::imread ( const String & filename, int flags = IMREAD_COLOR ) Python: retval = cv.imread( filename[, flags] ) https://docs.opencv.org/3.4.5/d4/da8/group__imgcodecs.html#ga288b8b3da0892bd651fce07b3bbd3a56 Dll Export Viewer shows: class cv::Ma...
by malcev
13 Jan 2019, 05:27
Forum: Ask For Help
Topic: Passing structure to function
Replies: 41
Views: 7288

Re: Passing structure to function

I thought that when we pass copy of structure and add note that it is int64, null bits will be added to the end automatically.
I was wrong?
by malcev
13 Jan 2019, 04:56
Forum: Ask For Help
Topic: Passing structure to function
Replies: 41
Views: 7288

Re: Passing structure to function

Helgef wrote:
29 Dec 2018, 15:28
But struct S2 {char c1;short s;char c2;} would need to be passed as "ptr", &S2 for x64
Why it should not be passed for x64 as "int64", c1 | (s << 16) | (c2 << 32)?
The size of this structure is 64bit.
by malcev
06 Jan 2019, 07:13
Forum: Ask For Help
Topic: AccessibleObjectFromWindow does not execute method accFocus in Firefox
Replies: 11
Views: 2198

Re: AccessibleObjectFromWindow does not execute method accFocus in Firefox

safetycar, try Your library.
Win7 64 bit, firefox v64.
Does not work with firefox at all.
teadrinker did You test it in win7?
by malcev
06 Jan 2019, 06:49
Forum: Ask For Help
Topic: Passing structure to function
Replies: 41
Views: 7288

Re: Passing structure to function

YMP2, Helgef, Thank You. It works!
by malcev
06 Jan 2019, 06:48
Forum: Ask For Help
Topic: AccessibleObjectFromWindow does not execute method accFocus in Firefox
Replies: 11
Views: 2198

Re: AccessibleObjectFromWindow does not execute method accFocus in Firefox

Does this code return focused element in firefox? f11:: Acc := Acc_ObjectFromWindow(WinExist("A")) loop { if isobject(Acc.accFocus) Acc := Acc.accFocus else { Child := Acc.accFocus if (Child = "") tooltip no else tooltip % "yes`n" acc.accName(Child) sleep 2000 return } }
by malcev
05 Jan 2019, 20:42
Forum: Ask For Help
Topic: Passing structure to function
Replies: 41
Views: 7288

Re: Passing structure to function

Thank You. You are right! Dont You know why this code works on autohotkey 32 bit with 32 bit dll, but it shows error 0xC0000005 on autohotkey 64 bit with 64 bit dll: width := 100 height := 100 cvsize := (height << 32) | width pimg := DllCall("opencv_core2413.dll\cvCreateImage", "int64", cvsize, "int...
by malcev
05 Jan 2019, 04:37
Forum: Ask For Help
Topic: Passing structure to function
Replies: 41
Views: 7288

Re: Passing structure to function

@ malcev , that really doesn't interest me, if you make an effort, I will help you if you get stuck. It is easier for me to count padding of structure by myself than read about differences between ahk v2 and ahk v1 to convert Your function. As I understand {char c;short s;} for x86 We have to pass ...
by malcev
03 Jan 2019, 14:42
Forum: Ask For Help
Topic: Passing structure to function
Replies: 41
Views: 7288

Re: Passing structure to function

Helgef, Can You convert your function for ahk v1?
Thank You!
by malcev
02 Jan 2019, 17:43
Forum: Ask For Help
Topic: WinHttp Error
Replies: 4
Views: 884

Re: WinHttp Error

Server have changed protocol.
by malcev
30 Dec 2018, 10:21
Forum: Ask For Help
Topic: Passing structure to function
Replies: 41
Views: 7288

Re: Passing structure to function

Helgef, may be this information and your examples will be useful here?
https://autohotkey.com/docs/commands/DllCall.htm#struct

Go to advanced search