public static UInt32 InjectIntoProcess(UInt32 pid, string logfile, CaptureOptions opts) { IntPtr logfile_mem = CustomMarshal.MakeUTF8String(logfile); UInt32 ret = RENDERDOC_InjectIntoProcess(pid, logfile_mem, opts, false); CustomMarshal.Free(logfile_mem); return(ret); }
public static void StartGlobalHook(string pathmatch, string logfile, CaptureOptions opts) { IntPtr pathmatch_mem = CustomMarshal.MakeUTF8String(pathmatch); IntPtr logfile_mem = CustomMarshal.MakeUTF8String(logfile); RENDERDOC_StartGlobalHook(pathmatch_mem, logfile_mem, opts); CustomMarshal.Free(logfile_mem); CustomMarshal.Free(pathmatch_mem); }
public static CaptureOptions GetDefaultCaptureOptions() { IntPtr mem = CustomMarshal.Alloc(typeof(CaptureOptions)); RENDERDOC_GetDefaultCaptureOptions(mem); CaptureOptions ret = (CaptureOptions)CustomMarshal.PtrToStructure(mem, typeof(CaptureOptions), true); CustomMarshal.Free(mem); return(ret); }
private LiveCapture OnInjectTrigger(UInt32 PID, string name, CaptureOptions opts) { if (!PromptCloseLog()) return null; string logfile = m_Core.TempLogFilename(name); UInt32 ret = StaticExports.InjectIntoProcess(PID, logfile, opts); if (ret == 0) { MessageBox.Show(string.Format("Error injecting into process {0} for capture.\n\nCheck diagnostic log in Help menu for more details.", PID), "Error kicking capture", MessageBoxButtons.OK, MessageBoxIcon.Error); return null; } var live = new LiveCapture(m_Core, "", ret, this); ShowLiveCapture(live); return live; }
private LiveCapture OnCaptureTrigger(string exe, string workingDir, string cmdLine, CaptureOptions opts) { if (!PromptCloseLog()) return null; string logfile = m_Core.TempLogFilename(Path.GetFileNameWithoutExtension(exe)); UInt32 ret = StaticExports.ExecuteAndInject(exe, workingDir, cmdLine, logfile, opts); if (ret == 0) { MessageBox.Show(string.Format("Error launching {0} for capture.\n\nCheck diagnostic log in Help menu for more details.", exe), "Error kicking capture", MessageBoxButtons.OK, MessageBoxIcon.Error); return null; } var live = new LiveCapture(m_Core, "", ret, this); ShowLiveCapture(live); return live; }
private static extern void RENDERDOC_StartGlobalHook(IntPtr pathmatch, IntPtr logfile, CaptureOptions opts);
private static extern UInt32 RemoteServer_ExecuteAndInject(IntPtr real, IntPtr app, IntPtr workingDir, IntPtr cmdLine, IntPtr env, CaptureOptions opts);
private static extern UInt32 RENDERDOC_ExecuteAndInject(IntPtr app, IntPtr workingDir, IntPtr cmdLine, IntPtr env, IntPtr logfile, CaptureOptions opts, bool waitForExit);
public static UInt32 ExecuteAndInject(string app, string workingDir, string cmdLine, EnvironmentModification[] env, string logfile, CaptureOptions opts) { IntPtr app_mem = CustomMarshal.MakeUTF8String(app); IntPtr workingDir_mem = CustomMarshal.MakeUTF8String(workingDir); IntPtr cmdLine_mem = CustomMarshal.MakeUTF8String(cmdLine); IntPtr logfile_mem = CustomMarshal.MakeUTF8String(logfile); IntPtr env_mem = RENDERDOC_MakeEnvironmentModificationList(env.Length); for (int i = 0; i < env.Length; i++) { IntPtr var_mem = CustomMarshal.MakeUTF8String(env[i].variable); IntPtr val_mem = CustomMarshal.MakeUTF8String(env[i].value); RENDERDOC_SetEnvironmentModification(env_mem, i, var_mem, val_mem, env[i].type, env[i].separator); CustomMarshal.Free(var_mem); CustomMarshal.Free(val_mem); } UInt32 ret = RENDERDOC_ExecuteAndInject(app_mem, workingDir_mem, cmdLine_mem, env_mem, logfile_mem, opts, false); RENDERDOC_FreeEnvironmentModificationList(env_mem); CustomMarshal.Free(app_mem); CustomMarshal.Free(workingDir_mem); CustomMarshal.Free(cmdLine_mem); CustomMarshal.Free(logfile_mem); return(ret); }
public static UInt32 InjectIntoProcess(UInt32 pid, string logfile, CaptureOptions opts) { return(RENDERDOC_InjectIntoProcess(pid, logfile, opts, false)); }
public static UInt32 ExecuteAndInject(string app, string workingDir, string cmdLine, string logfile, CaptureOptions opts) { return(RENDERDOC_ExecuteAndInject(app, workingDir, cmdLine, logfile, opts, false)); }
public UInt32 ExecuteAndInject(string app, string workingDir, string cmdLine, EnvironmentModification[] env, string logfile, CaptureOptions opts) { if (m_Remote == null) { return StaticExports.ExecuteAndInject(app, workingDir, cmdLine, env, logfile, opts); } else { UInt32 ret = 0; lock (m_Remote) { ret = m_Remote.ExecuteAndInject(app, workingDir, cmdLine, env, opts); } return ret; } }
public static UInt32 ExecuteAndInject(string app, string workingDir, string cmdLine, string logfile, CaptureOptions opts) { IntPtr app_mem = CustomMarshal.MakeUTF8String(app); IntPtr workingDir_mem = CustomMarshal.MakeUTF8String(workingDir); IntPtr cmdLine_mem = CustomMarshal.MakeUTF8String(cmdLine); IntPtr logfile_mem = CustomMarshal.MakeUTF8String(logfile); UInt32 ret = RENDERDOC_ExecuteAndInject(app_mem, workingDir_mem, cmdLine_mem, logfile_mem, opts, false); CustomMarshal.Free(app_mem); CustomMarshal.Free(workingDir_mem); CustomMarshal.Free(cmdLine_mem); CustomMarshal.Free(logfile_mem); return(ret); }
public static UInt32 InjectIntoProcess(UInt32 pid, EnvironmentModification[] env, string logfile, CaptureOptions opts) { IntPtr logfile_mem = CustomMarshal.MakeUTF8String(logfile); IntPtr env_mem = RENDERDOC_MakeEnvironmentModificationList(env.Length); for (int i = 0; i < env.Length; i++) { IntPtr var_mem = CustomMarshal.MakeUTF8String(env[i].variable); IntPtr val_mem = CustomMarshal.MakeUTF8String(env[i].value); RENDERDOC_SetEnvironmentModification(env_mem, i, var_mem, val_mem, env[i].type, env[i].separator); CustomMarshal.Free(var_mem); CustomMarshal.Free(val_mem); } UInt32 ret = RENDERDOC_InjectIntoProcess(pid, env_mem, logfile_mem, opts, false); RENDERDOC_FreeEnvironmentModificationList(env_mem); CustomMarshal.Free(logfile_mem); return ret; }
public static UInt32 ExecuteAndInject(string app, string workingDir, string cmdLine, EnvironmentModification[] env, string logfile, CaptureOptions opts) { IntPtr app_mem = CustomMarshal.MakeUTF8String(app); IntPtr workingDir_mem = CustomMarshal.MakeUTF8String(workingDir); IntPtr cmdLine_mem = CustomMarshal.MakeUTF8String(cmdLine); IntPtr logfile_mem = CustomMarshal.MakeUTF8String(logfile); IntPtr env_mem = RENDERDOC_MakeEnvironmentModificationList(env.Length); for(int i=0; i < env.Length; i++) { IntPtr var_mem = CustomMarshal.MakeUTF8String(env[i].variable); IntPtr val_mem = CustomMarshal.MakeUTF8String(env[i].value); RENDERDOC_SetEnvironmentModification(env_mem, i, var_mem, val_mem, env[i].type, env[i].separator); CustomMarshal.Free(var_mem); CustomMarshal.Free(val_mem); } UInt32 ret = RENDERDOC_ExecuteAndInject(app_mem, workingDir_mem, cmdLine_mem, env_mem, logfile_mem, opts, false); RENDERDOC_FreeEnvironmentModificationList(env_mem); CustomMarshal.Free(app_mem); CustomMarshal.Free(workingDir_mem); CustomMarshal.Free(cmdLine_mem); CustomMarshal.Free(logfile_mem); return ret; }
public static UInt32 ExecuteAndInject(string app, string workingDir, string cmdLine, string logfile, CaptureOptions opts) { return RENDERDOC_ExecuteAndInject(app, workingDir, cmdLine, logfile, opts, false); }
private static extern UInt32 RENDERDOC_ExecuteAndInject(string app, string workingDir, string cmdLine, string logfile, CaptureOptions opts, bool waitForExit);
public static UInt32 InjectIntoProcess(UInt32 pid, string logfile, CaptureOptions opts) { return RENDERDOC_InjectIntoProcess(pid, logfile, opts, false); }
public static UInt32 ExecuteAndInject(string app, string workingDir, string cmdLine, string logfile, CaptureOptions opts) { IntPtr app_mem = CustomMarshal.MakeUTF8String(app); IntPtr workingDir_mem = CustomMarshal.MakeUTF8String(workingDir); IntPtr cmdLine_mem = CustomMarshal.MakeUTF8String(cmdLine); IntPtr logfile_mem = CustomMarshal.MakeUTF8String(logfile); UInt32 ret = RENDERDOC_ExecuteAndInject(app_mem, workingDir_mem, cmdLine_mem, logfile_mem, opts, false); CustomMarshal.Free(app_mem); CustomMarshal.Free(workingDir_mem); CustomMarshal.Free(cmdLine_mem); CustomMarshal.Free(logfile_mem); return ret; }
public static UInt32 InjectIntoProcess(UInt32 pid, string logfile, CaptureOptions opts) { IntPtr logfile_mem = CustomMarshal.MakeUTF8String(logfile); UInt32 ret = RENDERDOC_InjectIntoProcess(pid, logfile_mem, opts, false); CustomMarshal.Free(logfile_mem); return ret; }
public static UInt32 InjectIntoProcess(UInt32 pid, EnvironmentModification[] env, string logfile, CaptureOptions opts) { IntPtr logfile_mem = CustomMarshal.MakeUTF8String(logfile); IntPtr env_mem = RENDERDOC_MakeEnvironmentModificationList(env.Length); for (int i = 0; i < env.Length; i++) { IntPtr var_mem = CustomMarshal.MakeUTF8String(env[i].variable); IntPtr val_mem = CustomMarshal.MakeUTF8String(env[i].value); RENDERDOC_SetEnvironmentModification(env_mem, i, var_mem, val_mem, env[i].type, env[i].separator); CustomMarshal.Free(var_mem); CustomMarshal.Free(val_mem); } UInt32 ret = RENDERDOC_InjectIntoProcess(pid, env_mem, logfile_mem, opts, false); RENDERDOC_FreeEnvironmentModificationList(env_mem); CustomMarshal.Free(logfile_mem); return(ret); }
private static extern UInt32 RENDERDOC_ExecuteAndInject(IntPtr app, IntPtr workingDir, IntPtr cmdLine, IntPtr logfile, CaptureOptions opts, bool waitForExit);
private static extern UInt32 RENDERDOC_InjectIntoProcess(UInt32 pid, IntPtr logfile, CaptureOptions opts, bool waitForExit);
private static extern UInt32 RENDERDOC_InjectIntoProcess(UInt32 pid, IntPtr env, IntPtr logfile, CaptureOptions opts, bool waitForExit);
private LiveCapture OnCaptureTrigger(string exe, string workingDir, string cmdLine, EnvironmentModification[] env, CaptureOptions opts) { if (!PromptCloseLog()) return null; string logfile = m_Core.TempLogFilename(Path.GetFileNameWithoutExtension(exe)); StaticExports.SetConfigSetting("MaxConnectTimeout", m_Core.Config.MaxConnectTimeout.ToString()); UInt32 ret = m_Core.Renderer.ExecuteAndInject(exe, workingDir, cmdLine, env, logfile, opts); if (ret == 0) { MessageBox.Show(string.Format("Error launching {0} for capture.\n\nCheck diagnostic log in Help menu for more details.", exe), "Error kicking capture", MessageBoxButtons.OK, MessageBoxIcon.Error); return null; } var live = new LiveCapture(m_Core, m_Core.Renderer.Remote == null ? "" : m_Core.Renderer.Remote.Hostname, ret, this); ShowLiveCapture(live); return live; }