Add feature to globally hook processes to inject indirectly.

* This allows you to hook into processes that are difficult to launch
  directly with the existing functionality in RenderDoc.
* This is rather risky, as it modifies the AppInit_DLLs registry key to
  inject a small shim dll that checks for the desired process and injects
  the full renderdoc.dll. If that registry key got left, or if there was
  some incompatibility with the shim dll, you could have problems. It
  should only ever be used as a last resort if there's no other way to
  capture.
This commit is contained in:
baldurk
2014-10-05 13:57:11 +01:00
parent a6d68e5598
commit 9460fbd970
29 changed files with 1292 additions and 110 deletions
+6
View File
@@ -94,6 +94,8 @@ namespace renderdocui.Code
public bool CheckUpdate_UpdateAvailable = false;
public DateTime CheckUpdate_LastUpdate = new DateTime(2012, 06, 27);
public bool AllowGlobalHook = false;
public void SetupFormatter()
{
Formatter.MinFigures = Formatter_MinFigures;
@@ -124,8 +126,12 @@ namespace renderdocui.Code
RecentCaptureSettings.Clear();
}
public bool ReadOnly = false;
public void Serialize(string file)
{
if (ReadOnly) return;
try
{
ReplayHostKeyValues.Clear();
+12
View File
@@ -91,5 +91,17 @@ namespace renderdocui.Code
[DllImport("shell32.dll")]
public static extern void SHChangeNotify(HChangeNotifyEventID wEventId, HChangeNotifyFlags uFlags, IntPtr dwItem1, IntPtr dwItem2);
[DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
private static extern uint GetShortPathName(string lpszLongPath, char[] lpszShortPath, int cchBuffer);
public static string ShortPath(string longpath)
{
char[] buffer = new char[256];
GetShortPathName(longpath, buffer, buffer.Length);
return new string(buffer);
}
}
}