ARTEAM EZINE ISSUE IV
PtempMSIL:=Ialloc.Alloc(202); //Copy orignial MSIL to memory PprotectedMSIL:=@ProtectedMSIL; CopyMemory(PtempMSIL,PprotectedMSIL,202); // Set new ILs CorProfilerInfo.SetILFunctionBody(ModuleID,IToken,PtempMSIL^); end end except on E: Exception do log(E.message); end; SyncExit end;
initialization TComObjectFactory.Create(ComServer, ProfilerClass, ProfilerGUID, ProfilerCoClassName, ProfilerDescription, ciMultiInstance, tmFree); end.
using .net profiling api for a custom .NET Protection by Kurapica
75