AllAPI Network - The KPD-Team

 
Allapi Network
 API-Guide
 ApiViewer

 API List

 
API Resources
 Tips & Tricks
 VB Tutorials
 Error Lookup
 
Misc Stuff
 VB examples
 VB Tools
 VB Links
 Top Downloads
 
This Site
 Search Engine
 Contact Form
 

Donate to AllAPI.net

GetModuleFileNameEx

The GetModuleFileNameEx function retrieves the fully qualified path for the specified module.

VB4-32,5,6
Declare Function GetModuleFileNameEx Lib "PSAPI.DLL" (ByVal hProcess As Long, ByVal hModule As Long, ByVal ModuleName As String, ByVal nSize As Long) As Long

VB.NET
System.Diagnostics.ProcessModule.FileName

Operating Systems Supported
Requires Windows NT 4.0 or later; Win9x/ME: Not supported

Library
Psapi

Parameter Information
· hProcess
[in] Handle to the process that contains the module.

· hModule
[in] Handle to the module.

· lpFilename
[out] Pointer to the buffer that receives the fully qualified path to the module. If the file name is longer than maximum number of characters specified by the nSize parameter, the file name is truncated.

· nSize
[in] Specifies the maximum number of characters to copy to the lpFilename buffer.

Return Values
If the function succeeds, the return value specifies the length of the string copied to the buffer.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Examples

Related Functions

No VB.NET Example Found

 

 


Copyright © 1998-2007, The Mentalis.org Team - Privacy statement
Did you find a bug on this page? Tell us!
This site is located at http://allapi.mentalis.org/