public static void GetAllEntries(string databasefile, string keyfile, out ConcurrentDictionary <string, KeyValuePair <string, string> > dictionary) { // public static void ListEntries(PwDatabase pwDb) dictionary = null; DpiUtil.ConfigureProcess(); //needed? if (!KeePass.Program.CommonInit()) //check if in same dir as KeePass?? { KeePass.Program.CommonTerminate(); return; } IOConnectionInfo ioc = new IOConnectionInfo(); ioc.Path = databasefile; ioc.CredSaveMode = IOCredSaveMode.NoSave; CompositeKey cmpKey = new CompositeKey(); cmpKey.AddUserKey(new KcpKeyFile(keyfile)); if ((cmpKey == null) || (cmpKey.UserKeyCount == 0)) { return; } PwDatabase pwDb = new PwDatabase(); pwDb.Open(ioc, cmpKey, null); EntryMod.GetAllEntries(pwDb, out dictionary); pwDb.Close(); }