-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathtest.au3
31 lines (20 loc) · 948 Bytes
/
test.au3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
$res = DllCall("L:\Projects.VisualStudio\AutoItInterpreter\new\test\cpp-interop-test\bin\cpp-interop-test.exe", "int:cdecl", "add", "int", 20, "int", 400)
; $res = DllCall("L:\Projects.VisualStudio\AutoItInterpreter\new\test\cpp-interop-test\bin\cpp-interop-test.exe", "void:cdecl", "say_hello")
ConsoleWrite("ERR:" & @error & @CRLF)
ConsoleWrite("RES:" & $res & @CRLF)
exit
func test($a, $b)
return $a + $b
endfunc
$callback = DllCallbackRegister(test, "int", "int;int")
$ptr = DllCallbackGetPtr($callback)
ConsoleWrite($callback & @crlf)
ConsoleWrite($ptr & @crlf)
$res = DllCallAddress("int", $ptr, "int", 400, "int", 20)
ConsoleWrite($res & @crlf)
DllCallbackFree($callback)
; ConsoleWrite(DllCall("user32.dll", "int", "MessageBoxW", "int", 0, "wstr", "top kek", "wstr", "title", "uint", 0))
ConsoleWrite(DllCall("user32.dll", "bool", "SetCursorPos", "int", 0, "int", 0))
exit
ClipPut('top " kek | jej ')
ConsoleWrite(@OSVersion)