@msdn=http://search.microsoft.com/search/results.aspx?qu=$$$ @pinvoke=http://pinvoke.net/$$$.htm Summary: The GetWindowModuleFileName API !!!!C# Signature: [DllImport("user32.dll", SetLastError=true, CharSet=CharSet.Auto)] static extern uint GetWindowModuleFileName(IntPtr hwnd, StringBuilder lpszFileName, uint cchFileNameMax); !!!!VB Signature: <DllImport("user32.dll", SetLastError := True, CharSet := CharSet.Auto)> _ Private Shared Function GetWindowModuleFileName(hwnd As IntPtr, _ lpszFileName As StringBuilder, cchFileNameMax As UInteger) As UInteger End Function !!!!User-Defined Types: None. !!!!Notes: Since Windows 2000, this function only has access to process internal information and cannot be used globally. Workaround: Use GetWindowThreadProcessId to get the process ID, then Process.GetProcessById to retrieve the process information. The resultant System.Diagnostics.Process Object's MainModule Property has the Filename Property, which is the Information you are probably searching. !!!!Tips & Tricks: Please add some! !!!!Sample Code: StringBuilder fileName = new StringBuilder(2000); GetWindowModuleFileName(hwnd, fileName, 2000); Debug.WriteLine(fileName.ToString()); !!!!Alternative Managed API: Do you know one? Please contribute it! Documentation: GetWindowModuleFileName@msdn on MSDN
Edit user32.GetWindowM...
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.