public TestInjection( RemoteHooking.IContext context, String channelName , TestComplexParameter parameter ) { // connect to host... _interface = RemoteHooking.IpcConnectClient <TestInterface>(channelName); _interface.Ping(); }
public TestInjection( RemoteHooking.IContext context, String channelName , TestComplexParameter parameter ) { // connect to host... _interface = RemoteHooking.IpcConnectClient<TestInterface>(channelName); _interface.Ping(); }
public void Run( RemoteHooking.IContext context, String channelName , TestComplexParameter parameter ) { try { CreateFileHook = LocalHook.Create( LocalHook.GetProcAddress("kernel32.dll", "CreateFileW"), new DCreateFile(CreateFile_Hooked), this); /* * Don't forget that all hooks will start deactivated... * The following ensures that all threads are intercepted: */ CreateFileHook.ThreadACL.SetExclusiveACL(new Int32[1]); } catch (Exception e) { /* Now we should notice our host process about this error... */ _interface.ReportException(e); return; } _interface.IsInstalled(RemoteHooking.GetCurrentProcessId()); _interface.SendMessage(parameter.Message); try { while (true) { Thread.Sleep(10); _interface.Ping(); } } catch { } }
public void Run( RemoteHooking.IContext context, String channelName , TestComplexParameter parameter ) { try { CreateFileHook = LocalHook.Create( LocalHook.GetProcAddress("kernel32.dll", "CreateFileW"), new DCreateFile(CreateFile_Hooked), this); /* * Don't forget that all hooks will start deactivated... * The following ensures that all threads are intercepted: */ CreateFileHook.ThreadACL.SetExclusiveACL(new Int32[1]); } catch (Exception e) { /* * Now we should notice our host process about this error... */ _interface.ReportException(e); return; } _interface.IsInstalled(RemoteHooking.GetCurrentProcessId()); _interface.SendMessage(parameter.Message); try { while (true) { Thread.Sleep(10); _interface.Ping(); } } catch { } }