Method GetModuleFileNameEx
GetModuleFileNameEx(nint, nint, StringBuilder, uint)
Retrieves the fully qualified path for the file containing the specified module.
public static extern uint GetModuleFileNameEx(nint hProcess, nint hModule, StringBuilder lpFilename, uint nSize)
Parameters
hProcessnintA handle to the process that contains the module.
hModulenintA handle to the module. If this parameter is Zero, the function returns the path of the executable file for the process specified in
hProcess.lpFilenameStringBuilderA StringBuilder that receives the module path.
nSizeuintThe size of the
lpFilenamebuffer, in characters.
Returns
- uint
The length, in characters, of the string copied to the buffer, or zero on failure.