Skip to content

Latest commit

 

History

History
48 lines (30 loc) · 1.35 KB

GetCommandLine.md

File metadata and controls

48 lines (30 loc) · 1.35 KB

Home

Function name : GetCommandLine

Group: Process and Thread - Library: kernel32


Returns a pointer to the command-line string for the current process.


Code examples:

Retrieving the command line for the VFP session
Converting command-line string to a set of Unicode argument strings

Declaration:

LPTSTR GetCommandLine(VOID);  

FoxPro declaration:

DECLARE INTEGER GetCommandLine IN kernel32  

Parameters:

This function has no parameters


Return value:

The return value is a pointer to the command-line string for the current process


Comments:

SYS(16), SYS(2019), and PCOUNT() all give same amount of information about the command line. May be for the VPF3 there is no other way to define a configuration file name but using this function.

There is another difference. GetCommandLine keeps its data as long as the process is running, whereas using native VFP functions you must store the input parameters in global variables, if you want to reach them later.

See also: CommandLineToArgvW.