Re: How to get the command line arguments of other running process
- From: "Manu" <dinil_kv@xxxxxxxxxxx>
- Date: Mon, 30 Jan 2006 16:04:59 +0530
Thanks James
"James Brown" <not@home> wrote in message
news:quedncQwkswjTEDeRVnyjA@xxxxxxxxxxxx
>
> "Manu" <dinil_kv@xxxxxxxxxxx> wrote in message
> news:%23hWd8jWJGHA.2012@xxxxxxxxxxxxxxxxxxxxxxx
> > Hi All,
> >
> > Any one can help me out, using c++ how to get the command line arguments
> > of
> > all the process which is running in the system.
> >
> > Thanks
> > Manu
> >
> >
>
> one way:
>
> 1. OpenProcess to get a process-handle
> 2. CreateRemoteThread to run the GetCommandLineA/W API in the remote
> process.
> 3. GetExitCodeThread to get the return-value from GetCommandLine
> 4. ReadProcessMemory on this memory-address to get the command-line
> 5. CloseHandle(s) appropriately
>
> You'll need to EnumProcesses if you want more than one process.
>
> James
>
> --
> Microsoft MVP - Windows SDK
> www.catch22.net
> Free Win32 Source and Tutorials
>
>
.
- References:
- Prev by Date: Re: Running external program and capture output Shellexecute?
- Next by Date: How to data from REG_RESOURCE_LIST from registry (Physical memory infromation)
- Previous by thread: Re: How to get the command line arguments of other running process
- Next by thread: Re: object oriented
- Index(es):