mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-25 07:05:48 +00:00
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:
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user