getting commandline of parent process

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • KakaICE
    New Member
    • Feb 2008
    • 1

    getting commandline of parent process

    Hi,
    I am using Visual Studio 2005
    The problem is:
    The parent.exe launches a child.exe executible. In the child.exe process I want to know the commandline with which parent.exe was originally launched.

    I am trying to do it as follows in child.exe:

    GetCurrentProce ssId()
    CreateToolhelp3 2Snapshot()
    get the parent process ID of child.exe process
    I get PROCESSENTRY32 for parent process ID.

    However PROCESSENTRY32. szExeFile gives only name of the binary and not the full commandline.

    Is there a way to fetch the commandline using which parent.exe was launched?
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    question moved to .NET forum

    Comment

    Working...