ShortcutResolver::Init() { CoInitialize(NULL);
nsresult Init(nsILocalFile* parent) { nsCAutoString filepath; parent->GetNativeTarget(filepath);  if (filepath.IsEmpty()) { parent->GetNativePath(filepath); }  if (filepath.IsEmpty()) { return NS_ERROR_UNEXPECTED; }
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;}