using System.Runtime.InteropServices;
namespace SkyHook
{
///
/// Native method calls for SkyHook.
///
internal static class SkyHookNative
{
///
/// The native callback handled by .
///
public delegate void Callback(SkyHookEvent ev);
private const string Lib = "skyhook";
///
/// The native version of method handled by .
///
/// A native callback.
/// null if no error, or an error message.
[DllImport(Lib, EntryPoint = "start_hook", CallingConvention = CallingConvention.Cdecl)]
public static extern string StartHook(Callback callback);
///
/// The native version of method handled by .
///
/// null if no error, or an error message.
[DllImport(Lib, EntryPoint = "stop_hook", CallingConvention = CallingConvention.Cdecl)]
public static extern string StopHook();
}
}