[API]
GetCommandLineA
GetCommandLineW

[INCLUDE]
PeekS

[CODE]
Public Function GetStrippedCommandLine() As String
  #If InIDE Then
    GetStrippedCommandLine = Command
    #Else
    Dim xLong1 As Long
    
    If IsUnicode Then
      xLong1 = GetCommandLineW
      Else
      xLong1 = GetCommandLineA
      End If
    If Not xLong1 = 0& Then
      GetStrippedCommandLine = PeekS(xLong1)
      If Left(GetStrippedCommandLine, 1&) = Chr(34) Then
        xLong1 = InStr(2&, GetStrippedCommandLine, Chr(34))
        Else
        xLong1 = InStr(GetStrippedCommandLine, " ")
        End If
      If xLong1 = 0& Then
        GetStrippedCommandLine = ""
        Else
        GetStrippedCommandLine = Trim(Mid(GetStrippedCommandLine, xLong1 + 1&))
        End If
      End If
    #End If
  End Function
