@msdn=http://search.microsoft.com/search/results.aspx?qu=$$$ @pinvoke=http://pinvoke.net/$$$.htm Summary: Retrieves the full name of the executable image for the specified process. (by Process Handle) !!!!C# Signature: [DllImport("kernel32.dll", SetLastError=true)] static extern bool QueryFullProcessImageName([In]IntPtr hProcess, [In]int dwFlags, [Out]StringBuilder lpExeName, ref int lpdwSize); !!!!VB Signature: Declare Function QueryFullProcessImageName Lib "kernel32.dll" (TODO) As TODO !!!!User-Defined Types: None. !!!!Alternative Managed API: System.Diagnostics.Process.MainModule.FileName !!!!Notes: To query the filename for a process that is running elevated from a process that is not, the .NET api crashes. This is a workaround. !!!!Tips & Tricks: Please add some! !!!!Sample Code: int capacity = 1024; StringBuilder sb = new StringBuilder(capacity); IntPtr handle = OpenProcess(ProcessAccess.QueryLimitedInformation, false, process.Id); QueryFullProcessImageName(handle, 0, sb, ref capacity); string fullPath = sb.ToString(0, capacity); Documentation: QueryFullProcessImageName@msdn on MSDN http://msdn.microsoft.com/en-us/library/windows/desktop/ms684919(v=vs.85).aspx
Edit kernel32.QueryFul...
You do not have permission to change this page. If you feel this is in error, please send feedback with the contact link on the main page.