const char* libFile;
PRLibSpec libSpec;  libSpec.type = PR_LibSpec_Pathname;
nsresult NS_COM XPCOMGlueStartup(const char* xpcomFile){#ifdef XPCOM_GLUE_NO_DYNAMIC_LOADING    return NS_OK;#else    nsresult rv;    const char* libFile;    if (!xpcomFile)        libFile = XPCOM_DLL;    else        libFile = xpcomFile;               xpcomLib = PR_LoadLibrary(libFile);    if (!xpcomLib)        return NS_ERROR_FAILURE;        GetFrozenFunctionsFunc function =         (GetFrozenFunctionsFunc)PR_FindSymbol(xpcomLib, "NS_GetFrozenFunctions");        if (!function) {        PR_UnloadLibrary(xpcomLib);        xpcomLib = nsnull;        return NS_ERROR_FAILURE;    }    xpcomFunctions = (XPCOMFunctions*) calloc(1, sizeof(XPCOMFunctions));    if (!xpcomFunctions){        PR_UnloadLibrary(xpcomLib);        xpcomLib = nsnull;        return NS_ERROR_FAILURE;    }       xpcomFunctions->version = XPCOM_GLUE_VERSION;    xpcomFunctions->size    = sizeof(XPCOMFunctions);    rv = (*function)(xpcomFunctions, libFile);    if (NS_FAILED(rv)) {        free(xpcomFunctions);        xpcomFunctions = nsnull;          PR_UnloadLibrary(xpcomLib);        xpcomLib = nsnull;        return NS_ERROR_FAILURE;    }    // startup the nsMemory    return GlueStartupMemory();#endif}