Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Reboot Your Computer
#6
The following code of yours works:

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$
Although since the current code already works then I don't need to upgrade it (because it might break) Angel
Reply


Messages In This Thread
Reboot Your Computer - by eoredson - 10-04-2025, 04:31 AM
RE: Reboot Your Computer - by SierraKen - 10-04-2025, 10:25 PM
RE: Reboot Your Computer - by eoredson - 10-05-2025, 10:23 PM
RE: Reboot Your Computer - by SierraKen - 10-08-2025, 02:37 PM
RE: Reboot Your Computer - by SpriggsySpriggs - 10-08-2025, 03:07 PM
RE: Reboot Your Computer - by eoredson - 10-09-2025, 02:08 AM
RE: Reboot Your Computer - by SpriggsySpriggs - 10-09-2025, 11:38 AM
RE: Reboot Your Computer - by eoredson - 10-09-2025, 09:55 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Trust The Computer James D Jarvis 0 511 11-16-2023, 01:19 PM
Last Post: James D Jarvis
  Is your computer watching you? James D Jarvis 7 1,532 09-06-2022, 03:41 PM
Last Post: JRace

Forum Jump:


Users browsing this thread: 1 Guest(s)