title: How does Windows pass the ANSI command line when creating a process?
body: <p>During process initialization, Windows sets up the <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa813706%28v=vs.85%29.aspx" rel="nofollow">PEB structure</a> which includes, among other things, a structure <code>RTL_USER_PROCESS_PARAMETERS</code> which in turn points to the UNICODE version of the command line.<br>
  You can also access it using <code>GetCommandLineW</code>.</p>
  
  <p><code>GetCommandLineA</code> returns the ANSI version and (obviously) points to a different address.</p>
  
  <p>My question is, does windows initialize the two versions during process creation, and which data structure, if any, points to the ANSI version of the command line? Also, is there a way other than calling GetCommandLineA to retrieve it?</p>
  
  <p>Thanks</p>