public static unsafe IntPtr CreateSearchInstanceFromText(char[] characters, LogCallbackFunction callback) { fixed(char *charactersPtr = characters) { return(CreateSearchInstanceFromText(charactersPtr, (ulong)characters.LongLength, callback)); } }
public static void Init(Action <LogType, string, string, Exception> onLog) { QueryPerformanceFrequency(out s_performanceFrequency); s_onLog = onLog; s_onLogCallbackFunction = new LogCallbackFunction((s, p, m) => onLog((LogType)s, p, " -" + m.TrimEnd('\n'), null)); StreamerConstants c = new StreamerConstants(); Core_Init(Marshal.GetFunctionPointerForDelegate(s_onLogCallbackFunction), ref c); Const = c; Const2 = new StreamerConstants2(c); ExtensionsManager.Init(); }
private static extern unsafe IntPtr CreateSearchInstanceFromText(char *charactersBegin, ulong count, LogCallbackFunction callback);
public StrSearch(char[] characters) { log = LogCallback; instance = CreateSearchInstanceFromText(characters, log); }