by イグトランス » 2005年7月09日(土) 12:19
PathGetArgsというコマンドラインからEXE自身の部分を取り除く関数があります。
これで足りることも多いですよ。
コード: 全て選択
Declare Function PathGetArgs Lib "shlwapi" Alias "PathGetArgsA" (psz As BytePtr) As BytePtr
Dim pszCmdLine As BytePtr
pszCmdLine = PathGetArgs(GetCommandLine())
MessageBox(0, pszCmdLine, "", MB_OK)
End
PathGetArgsというコマンドラインからEXE自身の部分を取り除く関数があります。
これで足りることも多いですよ。
[code]Declare Function PathGetArgs Lib "shlwapi" Alias "PathGetArgsA" (psz As BytePtr) As BytePtr
Dim pszCmdLine As BytePtr
pszCmdLine = PathGetArgs(GetCommandLine())
MessageBox(0, pszCmdLine, "", MB_OK)
End[/code]