1
- namespace UnicornManaged .Binding
1
+ namespace UnicornEngine .Binding
2
2
3
3
open System
4
4
open System.Runtime .InteropServices
5
5
6
6
module NativeBinding =
7
7
8
8
[<AutoOpen>]
9
- module private Imported =
9
+ module private Imported =
10
10
11
11
[<DllImport( " unicorn" , CallingConvention = CallingConvention.Cdecl) >]
12
12
extern Int32 uc_ version( UIntPtr major, UIntPtr minor)
13
13
14
14
[<DllImport( " unicorn" , CallingConvention = CallingConvention.Cdecl) >]
15
- extern Int32 uc_ open( UInt32 arch, UInt32 mode, UIntPtr[] engine)
15
+ extern Int32 uc_ open( UInt32 arch, UInt32 mode, UIntPtr[] engine)
16
16
17
17
[<DllImport( " unicorn" , CallingConvention = CallingConvention.Cdecl) >]
18
- extern Int32 uc_ close( UIntPtr eng)
18
+ extern Int32 uc_ close( UIntPtr eng)
19
19
20
20
[<DllImport( " unicorn" , CallingConvention = CallingConvention.Cdecl) >]
21
- extern Int32 uc_ mem_ map( UIntPtr eng, UInt64 address, UIntPtr size, UInt32 perm)
21
+ extern Int32 uc_ mem_ map( UIntPtr eng, UInt64 address, UInt64 size, UInt32 perm)
22
22
23
23
[<DllImport( " unicorn" , CallingConvention = CallingConvention.Cdecl) >]
24
- extern Int32 uc_ mem_ map_ ptr( UIntPtr eng, UInt64 address, UIntPtr size, UInt32 perm, UIntPtr ptr)
24
+ extern Int32 uc_ mem_ map_ ptr( UIntPtr eng, UInt64 address, UInt64 size, UInt32 perm, UIntPtr ptr)
25
25
26
26
[<DllImport( " unicorn" , CallingConvention = CallingConvention.Cdecl) >]
27
- extern Int32 uc_ mem_ unmap( UIntPtr eng, UInt64 address, UIntPtr size)
27
+ extern Int32 uc_ mem_ unmap( UIntPtr eng, UInt64 address, UInt64 size)
28
28
29
29
[<DllImport( " unicorn" , CallingConvention = CallingConvention.Cdecl) >]
30
- extern Int32 uc_ mem_ protect( UIntPtr eng, UInt64 address, UIntPtr size, UInt32 perms)
31
-
30
+ extern Int32 uc_ mem_ protect( UIntPtr eng, UInt64 address, UInt64 size, UInt32 perms)
31
+
32
32
[<DllImport( " unicorn" , CallingConvention = CallingConvention.Cdecl) >]
33
- extern Int32 uc_ mem_ write( UIntPtr eng, UInt64 address, Byte[] value, UIntPtr size)
33
+ extern Int32 uc_ mem_ write( UIntPtr eng, UInt64 address, Byte[] value, UInt64 size)
34
34
35
35
[<DllImport( " unicorn" , CallingConvention = CallingConvention.Cdecl) >]
36
- extern Int32 uc_ mem_ read( UIntPtr eng, UInt64 address, Byte[] value, UIntPtr size)
36
+ extern Int32 uc_ mem_ read( UIntPtr eng, UInt64 address, Byte[] value, UInt64 size)
37
37
38
38
[<DllImport( " unicorn" , CallingConvention = CallingConvention.Cdecl) >]
39
39
extern Int32 uc_ reg_ write( UIntPtr eng, Int32 regId, Byte[] value)
@@ -67,7 +67,7 @@ module NativeBinding =
67
67
68
68
[<DllImport( " unicorn" , CallingConvention = CallingConvention.Cdecl, EntryPoint = " uc_hook_add" ) >]
69
69
extern Int32 uc_ hook_ add_ arg0_ arg1( UIntPtr eng, UIntPtr hh, Int32 callbackType, UIntPtr callback, IntPtr userData, UInt64 hookbegin, UInt64 hookend, UInt64 arg0, UInt64 arg1)
70
-
70
+
71
71
let instance =
72
72
{ new IBinding with
73
73
member thi.Version ( major , minor ) = uc_ version( major, minor)
@@ -90,4 +90,4 @@ module NativeBinding =
90
90
member thi.HookAddNoarg ( eng , hh , callbackType , callback , userData , hookBegin , hookEnd ) = uc_ hook_ add_ noarg( eng, hh, callbackType, callback, userData, hookBegin, hookEnd)
91
91
member thi.HookAddArg0 ( eng , hh , callbackType , callback , userData , hookBegin , hookEnd , arg0 ) = uc_ hook_ add_ arg0( eng, hh, callbackType, callback, userData, hookBegin, hookEnd, arg0)
92
92
member thi.HookAddArg0Arg1 ( eng , hh , callbackType , callback , userData , hookBegin , hookEnd , arg0 , arg1 ) = uc_ hook_ add_ arg0_ arg1( eng, hh, callbackType, callback, userData, hookBegin, hookEnd, arg0, arg1)
93
- }
93
+ }
0 commit comments