by マティ » 2005年11月24日(木) 18:06
以下の過去ログを参考にすると、コマンドラインのパラメータを取得できます。
http://www.discoversoft.net/forum/viewt ... 5%A4%A5%F3
コード: 全て選択
Declare Function PathGetArgs Lib "shlwapi" Alias "PathGetArgsA" (psz As BytePtr) As BytePtr
Dim pszCmdLine As BytePtr
pszCmdLine = PathGetArgs(GetCommandLine())
''MessageBox(0, pszCmdLine, "", MB_OK) '全てのパラメータを表示する
If(InStr(1,pszCmdLine,"-t")>0)Then '-tがある場合にメッセージを表示
MessageBox(0,"Hello World","",MB_OK)
End If
End
以下の過去ログを参考にすると、コマンドラインのパラメータを取得できます。
[url]http://www.discoversoft.net/forum/viewtopic.php?t=168&highlight=%A5%B3%A5%DE%A5%F3%A5%C9%A5%E9%A5%A4%A5%F3[/url]
[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) '全てのパラメータを表示する
If(InStr(1,pszCmdLine,"-t")>0)Then '-tがある場合にメッセージを表示
MessageBox(0,"Hello World","",MB_OK)
End If
End
[/code]