public APIUnit(int pid, string function, APIType type, APICategory category, APIID id) { Function = function.Split('!')[1]; ProcessID = pid; Category = category; Type = type; ID = id; }
static APIUnit Base(APIType type, APICategory cat, APIID id, NktHook hook, NktProcess process, NktHookCallInfo callInfo) { if (callInfo.StackTrace().Module(0) == null) { return(null); } string module = callInfo.StackTrace().Module(0).Name.ToUpper(); if (!Modules.Contains(module)) { return(null); } APIUnit report = new APIUnit(process.Id, hook.FunctionName, type, cat, id); report.Module = module; return(report); }