nsString tmpfmt("%s"); *_retval = nsTextFormatter::smprintf( tmpfmt.GetUnicode(), tmpstr );
*_retval = nsTextFormatter::smprintf( widestrFormat, tmpstr );
NS_IMETHODIMP nsRegistry::GetString(nsRegistryKey baseKey, const PRUnichar *valname, PRUnichar **_retval){    nsresult rv = NS_OK;    // Make sure caller gave us place for result.    if ( !valname || !_retval )        return NS_ERROR_NULL_POINTER;    // initialize the return value    *_retval = nsnull;    char *tmpstr = nsnull;    nsString name( nsSubsumeStr( NS_CONST_CAST(PRUnichar*,valname), PR_FALSE ) );    char* utf8name = name.ToNewUTF8String();    if ( !utf8name )        return NS_ERROR_OUT_OF_MEMORY;    rv = GetStringUTF8( baseKey, utf8name, &tmpstr );    if (NS_SUCCEEDED(rv))    {        nsString tmpfmt("%s");        *_retval = nsTextFormatter::smprintf( tmpfmt.GetUnicode(), tmpstr );        nsCRT::free(tmpstr);        if ( *_retval == nsnull )            rv = NS_ERROR_OUT_OF_MEMORY;    }    Recycle( utf8name );    return rv;}