Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // The name of the DLL to output exports from
- const string dllName = @"C:WindowsSystem32Wdi.dll";
- string output = string.Empty;
- var info = new ProcessStartInfo();
- var process = new Process();
- info.CreateNoWindow = true;
- info.RedirectStandardOutput = true;
- info.UseShellExecute = false;
- info.EnvironmentVariables.Remove("Path");
- // DumpBin requires a path to IDE
- info.EnvironmentVariables.Add("Path", Environment.GetEnvironmentVariable("Path") + @";c:Program Files (x86)Microsoft Visual Studio 10.0Common7IDE");
- // Your path might be different below.
- info.FileName = @"c:Program Files (x86)Microsoft Visual Studio 10.0VCbindumpbin.exe";
- info.Arguments = string.Format("/exports "{0}"", dllName);
- process.OutputDataReceived += (senderObject, args) => output = output + args.Data;
- process.StartInfo = info;
- process.Start();
- process.BeginOutputReadLine();
- process.WaitForExit();
- // output now contains the output
Add Comment
Please, Sign In to add comment