Embed Windows Internet Explorer

Andre andre at s-e-a-p.de
Thu Dec 19 08:07:21 PST 2013


Am 19.12.2013 16:54, schrieb Adam D. Ruppe:
> 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.

Thanks a lot!
thats the solution





More information about the Digitalmars-d-learn mailing list