Convert const char* to wstring
<p>I'm working on a native extension for a zinc based flash application and I need to convert a <code>const char*</code> to a <code>wstring</code>.</p>

<p>This is my code:</p>

<pre><code>mdmVariant_t* appendHexDataToFile(const zinc4CallInfo_t *pCallInfo, int paramCount, mdmVariant_t **params) {

    if(paramCount &gt;= 2) {
        const char *file    = mdmVariantGetString(params[0]);
        const char *data    = mdmVariantGetString(params[1]);

        return mdmVariantNewInt(native.AppendHexDataToFile(file, data));
    }
    else {
        return mdmVariantNewBoolean(FALSE);
    }
}
</code></pre>

<p>But <code>native.AppendHexDataToFile()</code> needs two <code>wstring</code>.
I'm not very good with C++ and I think all those different string types are totally confusing and I didn't find something useful in the net. So I'm asking you guys how to do it.</p>

<p><strong>Edit</strong>: The Strings are UTF-8 and I'm using OSX and Windows XP/Vista/7</p>
