关于FindCmdLineSwitch函数的使用
Ascn 2004-02-17 10:43:03 谁知道这个函数怎么用的?
Determines whether a string was passed as a command line argument to the application.
Unit
SysUtils
Category
command line utilities
function FindCmdLineSwitch(const Switch: string; SwitchChars: TSysCharSet; IgnoreCase: Boolean): Boolean;
Description
FindCmdLineSwitch determines whether the string specified by the Switch parameter was passed as a command line argument to the application. SwitchChars identifies valid argument-delimiter characters (such as "-"and "/"). The IgnoreCase parameter controls whether a case-sensitive or case-insensitive search is performed.
由于没有找到例子代码,我不知道它具体怎么用,因为我想让自己的程序可传入多个
参数,各参数不分顺序,如下格式:
myApp.exe -U:user -P:pwd
或者: myApp.exe -U user -P pwd
麻烦给点具体代码,必须要带switch处理的。谢谢