The following code of yours works:
Although since the current code already works then I don't need to upgrade it (because it might break)
Code: (Select All)
Declare Library
Function strlen& (ByVal str As _Offset)
Function GetCommandLineA%& ()
End Declare
Dim As _MEM m
Dim As _Offset a
Dim As String ms
Dim As Long cmdLen
cmdLen = strlen(GetCommandLineA)
ms = Space$(cmdLen)
a = GetCommandLineA
m = _Mem(a, cmdLen)
_MemGet m, m.OFFSET, ms
_MemFree m
p = InStr(2, ms, Chr$(34))
p$ = Left$(ms, p)
c$ = Mid$(ms, p + 1)
Print "Program: "; p$
Print "Command: "; c$

