mLock = PR_NewLock(); if (!mLock) return NS_ERROR_FAILURE;  HRESULT hres = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLink, (void**)&mShellLink); if (SUCCEEDED(hres)) {  hres = mShellLink->QueryInterface(IID_IPersistFile, (void**)&mPersistFile); }  if (mPersistFile == nsnull || mShellLink == nsnull) return NS_ERROR_FAILURE;  return NS_OK; }
mDir = PR_OpenDir(filepath.get()); if (mDir == nsnull) return NS_ERROR_FAILURE;  mParent          = parent; return NS_OK; }
ShortcutResolver::Init(){    CoInitialize(NULL);  // FIX: we should probably move somewhere higher up during startup    mLock = PR_NewLock();    if (!mLock)        return NS_ERROR_FAILURE;    HRESULT hres = CoCreateInstance(CLSID_ShellLink,                                     NULL,                                     CLSCTX_INPROC_SERVER,                                     IID_IShellLink,                                     (void**)&mShellLink);     if (SUCCEEDED(hres))     {        // Get a pointer to the IPersistFile interface.         hres = mShellLink->QueryInterface(IID_IPersistFile, (void**)&mPersistFile);     }        if (mPersistFile == nsnull || mShellLink == nsnull)        return NS_ERROR_FAILURE;    return NS_OK;}