title: Alternatives to NtQueryInformationProcess to get commandline
body: <p>Hello I am using <strong><a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms684280%28v=vs.85%29.aspx" rel="nofollow">NtQueryInformationProcess()</a> to retrieve the command line of current process</strong> (via the RTL_USER_PROCESS_PARAMETERS in the PEB returned by NtQueryInformationProcess()) on Windows 7.</p>
  
  <p>But the problem is this <strong>The NtQueryInformationProcess function and the structures that it returns are</strong> internal to the operating system and <strong>subject to change from one release of Windows to another</strong></p>
  
  <p>So Please suggest some <strong>alternatives for the same to maintain the compatibility of application</strong></p>