new Wrote:

> hi,
> 
> how does one convert char[] to BSTR and back? i am looking to use a dll that 
> contains function such as
> 
> BSTR tester = gettest(BSTR *in, BSTR in1);
> 
> any help is appreciated.

  wchar* bstr = SysAllocString(std.utf.toUTF16z(s));

and

  char[] s = std.utf.toUTF8(bstr[0 .. SysStringLen(bstr)]);
  SysFreeString(bstr);

Reply via email to