title: How to convert char * to BSTR?
body: <p>How can I pass a char * from C dll to VB </p>
  
  <p>Here is sample code:</p>
  
  <pre><code>void Cfunc(char *buffer,int len)
  {
    BSTR buf_bstr = SysAllocString((BSTR)buffer);
    VBptr.VBfunc(buf_bstr,len);
  }
  </code></pre>
  
  <p>This function is not working, In actual some other values are sent to the VB rather than the actual value. </p>
  
  <p>Could anyone please suggest a solution?</p>