Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide to Clip-4-Win version 3.0 - <b>getmodulefilename()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
GetModuleFileName()
Get the full path of an executable file
------------------------------------------------------------------------------

Syntax
GetModuleFileName( [ <hInst> ] )  -->  cFileName

Arguments
<hInst> is an optional handle specifying the module.  The
default is the current application.

Returns
If successful, the filename of the executable containing the
module is returned.  If an error occurs, NIL is returned.

Description
This function can be used to find the full path and filename
of an instance of a module (normally the currently executing
program).

Example
// get the directory where the application is installed
cPath = GetModuleFileName()
if cPath != nil
     cDir = left( cPath, rat( "\", cPath) - 1 )
     .
     .    // do something with cDir and/or cPath
     .
endif


See Also: WinExec()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson