This repository has been archived on 2023-05-28. You can view files and clone it, but cannot push or open issues/pull-requests.
SkyHook-Unity/Runtime/SkyHookNative.cs

17 lines
494 B
C#
Raw Normal View History

2022-11-03 20:55:22 +09:00
using System.Runtime.InteropServices;
namespace SkyHook
{
2022-11-04 22:29:12 +09:00
internal static class SkyHookNative
2022-11-03 20:55:22 +09:00
{
public delegate void Callback(SkyHookEvent ev);
2022-11-04 22:29:12 +09:00
private const string Lib = "skyhook";
2022-11-03 20:55:22 +09:00
2022-11-04 22:29:12 +09:00
[DllImport(Lib, EntryPoint = "start_hook", CallingConvention = CallingConvention.Cdecl)]
2022-11-03 20:55:22 +09:00
public static extern string StartHook(Callback callback);
2022-11-04 22:29:12 +09:00
[DllImport(Lib, EntryPoint = "stop_hook", CallingConvention = CallingConvention.Cdecl)]
2022-11-03 20:55:22 +09:00
public static extern string StopHook();
}
}