mParent          = parent; return NS_OK; }
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; }
        nsresult Init(nsILocalFile* parent)         {            char* filepath;            parent->GetTarget(&filepath);                    if (filepath == nsnull)            {                parent->GetPath(&filepath);            }                        if (filepath == nsnull)            {                return NS_ERROR_OUT_OF_MEMORY;            }            mDir = PR_OpenDir(filepath);            if (mDir == nsnull)    // not a directory?                return NS_ERROR_FAILURE;						nsMemory::Free(filepath);            mParent          = parent;                return NS_OK;        }