title: Using Win32 dll in c# Application(returning char* to c# problem)
body: <p>I am working on c# application(Using win 32 dll in my apllication)...I am trying something like this
  In DLL(test.dll):</p>
  
  <pre><code>char* Connect(TCHAR* lpPostData)
  {
  char buffer[1000];
  .....
  return buffer;
  }
  </code></pre>
  
  <p>IN c# application:</p>
  
  <pre><code>[DllImport("test.dll", EntryPoint = "Connect", CharSet = CharSet.Unicode)]
   [return: MarshalAs(UnmanagedType.LPWStr)]
   public static extern string Connect(StringBuilder postdata);
  
  string returnedData = Connect(postdata);
  </code></pre>
  
  <p>But returning of data is not happening properly....
  Pls can any body tell where i am going wrong 
  Thanks in advance</p>