title: Should I pin my array before calling GetSystemWow64Directory
body: <p>I am trying to use the <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms724405%28v=vs.85%29.aspx" rel="nofollow">GetSystemWow64Direcory</a> method from my application.  The sample from <a href="http://www.pinvoke.net/default.aspx/kernel32.getsystemwow64directory" rel="nofollow">PInvoke.net</a> seems incorrect to me.  Don't I have to pin the the array before passing to the unmanaged call?</p>
  
  <pre><code>[DllImport("Kernel32.dll")]
  public static extern int GetSystemWow64Directory([In, Out] char[] lpBuffer
      [MarshalAs(UnmanagedType.U4)] uint size);
  
  char[] path = new char[256];
  
  int result = GetSystemWow64Directory(path, (uint)path.Length);
  if (result != 0)
      MessageBox.Show(new String(path, 0, result));
  </code></pre>