nsresult Init(nsILocalFile* parent) { char* filepath; parent->GetTarget(&filepath);  if (filepath == nsnull) { parent->GetPath(&filepath); }  if (filepath == nsnull) { return NS_ERROR_OUT_OF_MEMORY; }
ShortcutResolver::Init() { CoInitialize(NULL);
        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;        }