get application path?

General FreeBASIC programming questions.
Post Reply
oyster
Posts: 274
Joined: Oct 11, 2005 10:46

get application path?

Post by oyster »

I mean get the path where exe file is located in

command(0) only get the name of the application

thanks
robert
Posts: 169
Joined: Aug 06, 2019 18:45

Re: get application path?

Post by robert »

Vortex
Posts: 118
Joined: Sep 19, 2005 9:50

Re: get application path?

Post by Vortex »

Windows API function : GetModuleFileName

https://docs.microsoft.com/en-us/window ... dfrom=MSDN
Parameters
[in, optional] hModule

A handle to the loaded module whose path is being requested. If this parameter is NULL, GetModuleFileName retrieves the path of the executable file of the current process.
Post Reply