User32GetWindowModuleFileName(IntPtr, StringBuilder, UInt32) Method
Retrieves the full path and file name of the module associated with the specified window handle.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("User32.dll", CharSet = CharSet.Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true)]
public static uint GetWindowModuleFileName(
IntPtr hWnd,
StringBuilder fileName,
uint fileNameMax
)
<DllImportAttribute("User32.dll", CharSet := CharSet.Auto, BestFitMapping := false,
ThrowOnUnmappableChar := true>]
Public Shared Function GetWindowModuleFileName (
hWnd As IntPtr,
fileName As StringBuilder,
fileNameMax As UInteger
) As UInteger
Dim hWnd As IntPtr
Dim fileName As StringBuilder
Dim fileNameMax As UInteger
Dim returnValue As UInteger
returnValue = User32.GetWindowModuleFileName(hWnd,
fileName, fileNameMax)
public:
[DllImportAttribute(L"User32.dll", CharSet = CharSet::Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true)]
static unsigned int GetWindowModuleFileName(
IntPtr hWnd,
StringBuilder^ fileName,
unsigned int fileNameMax
)
[<DllImportAttribute("User32.dll", CharSet = CharSet.Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true)>]
static member GetWindowModuleFileName :
hWnd : IntPtr *
fileName : StringBuilder *
fileNameMax : uint32 -> uint32
No code example is currently available or this language may not be supported.
- hWnd IntPtr
-
A handle to the window whose module file name is to be retrieved.
- fileName StringBuilder
-
The path and file name.
- fileNameMax UInt32
-
The maximum number of characters that can be copied into the fileName buffer.
UInt32
If the function succeeds, the return value is
.
If the function fails, the return value is
.
To get extended error information, call
GetLastWin32Error.