Uhh ohh... Using the "Scientific method" of "trial-n-error", I have
finally hacked something to convert at least to std::string

    BSTR mybstr;
    int ni=0;
    while (((wchar_t*)mybstr[ni]) != NULL)
    {
      ni++;
    }
    int len = ni;
    char arrayChars[len];
    ni = 0;

    while (ni != len)
    {
      arrayChars[ni] = (char*)mybstr[ni];
      ni++;
    }
    string mystr = arrayChars;
    cout << mystr << endl;

_______________________________________________
vbox-dev mailing list
[email protected]
https://www.virtualbox.org/mailman/listinfo/vbox-dev

Reply via email to