Revert "feat: update actions"

This reverts commit ad9624f1d72b1c75b65a3c7876ef75d3171df874.
This commit is contained in:
tiennm99 committed 2026-02-27 15:29:26 +07:00
1 parent b2329b68c9
commit d394f6f589
2 files changed
+9 -13

No files matched your search

@@ -65,29 +65,23 @@ namespace TimeMocker.Hook
public void Run(RemoteHooking.IContext context, string mmfName)
{
string logPath = Path.Combine(Path.GetTempPath(), "TimeMocker.Hook.log");
try
{
File.AppendAllText(logPath, $"[{DateTime.Now}] Starting hook, MMF: {mmfName}\r\n");
// Open the shared memory created by the UI process
_mmf = System.IO.MemoryMappedFiles.MemoryMappedFile.OpenExisting(mmfName);
_view = _mmf.CreateViewAccessor(0, Marshal.SizeOf<MockTimeInfo>());
File.AppendAllText(logPath, $"[{DateTime.Now}] MMF opened successfully\r\n");
InstallHooks();
File.AppendAllText(logPath, $"[{DateTime.Now}] Hooks installed successfully\r\n");
RemoteHooking.WakeUpProcess();
File.AppendAllText(logPath, $"[{DateTime.Now}] Process woken up\r\n");
// Keep alive until process exits
while (true) Thread.Sleep(500);
}
catch (Exception ex)
{
File.AppendAllText(logPath, $"[{DateTime.Now}] ERROR: {ex.GetType().Name}: {ex.Message}\r\n{ex.StackTrace}\r\n");
File.AppendAllText(
Path.Combine(Path.GetTempPath(), "TimeMocker.Hook.log"),
$"[{DateTime.Now}] ERROR: {ex}\r\n");
}
finally
{