SHARE
TWEET

Untitled

a guest Jan 18th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // The name of the DLL to output exports from
  2.         const string dllName = @"C:WindowsSystem32Wdi.dll";
  3.         string output = string.Empty;
  4.         var info = new ProcessStartInfo();
  5.         var process = new Process();
  6.  
  7.         info.CreateNoWindow = true;
  8.         info.RedirectStandardOutput = true;
  9.         info.UseShellExecute = false;
  10.         info.EnvironmentVariables.Remove("Path");
  11.         // DumpBin requires a path to IDE
  12.         info.EnvironmentVariables.Add("Path", Environment.GetEnvironmentVariable("Path") + @";c:Program Files (x86)Microsoft Visual Studio 10.0Common7IDE");
  13.  
  14.         // Your path might be different below.
  15.         info.FileName = @"c:Program Files (x86)Microsoft Visual Studio 10.0VCbindumpbin.exe";
  16.  
  17.         info.Arguments = string.Format("/exports "{0}"", dllName);
  18.  
  19.         process.OutputDataReceived += (senderObject, args) => output = output + args.Data;
  20.         process.StartInfo = info;
  21.         process.Start();
  22.         process.BeginOutputReadLine();
  23.  
  24.         process.WaitForExit();
  25.         // output now contains the output
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top