Embed Windows Internet Explorer

Adam D. Ruppe destructionator at gmail.com
Thu Dec 19 07:54:25 PST 2013


On Thursday, 19 December 2013 at 15:45:49 UTC, Andre wrote:
> Exacactly. But if I have my url in a string variable,
> how can I get the wchar[].ptr from my string variable,
> to fill bstrVal?

You can use wstring variables and convert them with

import std.utf;

wchar* str = toUTFz!(wchar*)(another_string_variable);

then you can fill it. Or you can also do

import std.conv;

wstring ws = to!wstring(another_string_variable);



The difference is the first one has a zero terminator, so you can 
easily pass it to C functions. The second one doesn't, but it is 
a D array so you can use .ptr and .length.


More information about the Digitalmars-d-learn mailing list