[DllImport("user32.dll", SetLastError=true, CharSet=CharSet.Auto)]
static extern uint GetWindowModuleFileName(IntPtr hwnd,
StringBuilder lpszFileName, uint cchFileNameMax);
<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
None.
Since Windows 2000, this function only has access to process internal information and cannot be used globally.
Please add some!
StringBuilder fileName = new StringBuilder(2000);
GetWindowModuleFileName(hwnd, fileName, 2000);
Debug.WriteLine(fileName.ToString());
Do you know one? Please contribute it!