Configuration.cpp 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656
  1. //---------------------------------------------------------------------------
  2. #include <vcl.h>
  3. #pragma hdrstop
  4. #include <FileInfo.h>
  5. #include "Exceptions.h"
  6. #include "Common.h"
  7. #include "Configuration.h"
  8. #include "PuttyIntf.h"
  9. #include "TextsCore.h"
  10. #include "Interface.h"
  11. #define GSSAPIDLL "gssapi32"
  12. //---------------------------------------------------------------------------
  13. #pragma package(smart_init)
  14. //---------------------------------------------------------------------------
  15. __fastcall TConfiguration::TConfiguration()
  16. {
  17. FCriticalSection = new TCriticalSection();
  18. FUpdating = 0;
  19. FStorage = stDetect;
  20. DontSave = false;
  21. RandomSeedSave = true;
  22. FApplicationInfo = NULL;
  23. FGSSAPIInstalled = -1;
  24. }
  25. //---------------------------------------------------------------------------
  26. void __fastcall TConfiguration::Default()
  27. {
  28. TGuard Guard(FCriticalSection);
  29. AnsiString ARandomSeedFile = RandomSeedFile;
  30. // This works correct only when Default() is called before first
  31. // change to RandomSeedFile property
  32. RandomSeedFile = StringReplace(ExtractFilePath(ARandomSeedFile) +
  33. "winscp" + ExtractFileExt(ARandomSeedFile), "\\\\", "\\",
  34. TReplaceFlags() << rfReplaceAll);
  35. FConfirmOverwriting = true;
  36. FRememberPassword = false;
  37. FLogging = false;
  38. FLogFileName = "";
  39. FLogFileAppend = true;
  40. FLogWindowLines = 100;
  41. FDisablePasswordStoring = false;
  42. Changed();
  43. }
  44. //---------------------------------------------------------------------------
  45. __fastcall TConfiguration::~TConfiguration()
  46. {
  47. assert(!FUpdating);
  48. if (RandomSeedSave) random_save_seed();
  49. if (FApplicationInfo) FreeFileInfo(FApplicationInfo);
  50. delete FCriticalSection;
  51. }
  52. //---------------------------------------------------------------------------
  53. THierarchicalStorage * TConfiguration::CreateScpStorage(bool /*SessionList*/)
  54. {
  55. if (Storage == stRegistry)
  56. {
  57. return new TRegistryStorage(RegistryStorageKey);
  58. }
  59. else
  60. {
  61. return new TIniFileStorage(IniFileStorageName);
  62. }
  63. }
  64. //---------------------------------------------------------------------------
  65. #define LASTELEM(ELEM) \
  66. ELEM.SubString(ELEM.LastDelimiter(".>")+1, ELEM.Length() - ELEM.LastDelimiter(".>"))
  67. #define BLOCK(KEY, CANCREATE, BLOCK) \
  68. if (Storage->OpenSubKey(KEY, CANCREATE)) try { BLOCK } __finally { Storage->CloseSubKey(); }
  69. #define REGCONFIG(ACCESS, CANCREATE, ADDON) \
  70. THierarchicalStorage * Storage = CreateScpStorage(false); \
  71. try { \
  72. Storage->AccessMode = ACCESS; \
  73. if (Storage->OpenSubKey(ConfigurationSubKey, CANCREATE)) { \
  74. BLOCK("Interface", CANCREATE, \
  75. KEY(String, RandomSeedFile); \
  76. KEY(Bool, ConfirmOverwriting); \
  77. KEY(Bool, RememberPassword); \
  78. ); \
  79. BLOCK("Logging", CANCREATE, \
  80. KEY(Bool, Logging); \
  81. KEY(String, LogFileName); \
  82. KEY(Bool, LogFileAppend); \
  83. KEY(Integer, LogWindowLines); \
  84. ); \
  85. ADDON(Storage); \
  86. }; \
  87. } __finally { \
  88. delete Storage; \
  89. }
  90. //---------------------------------------------------------------------------
  91. void __fastcall TConfiguration::SaveSpecial(THierarchicalStorage * /*Storage*/)
  92. {
  93. }
  94. //---------------------------------------------------------------------------
  95. void __fastcall TConfiguration::Save()
  96. {
  97. if (DontSave) return;
  98. if (Storage == stRegistry) CleanupIniFile();
  99. #define KEY(TYPE, VAR) Storage->Write ## TYPE(LASTELEM(AnsiString(#VAR)), VAR)
  100. REGCONFIG(smReadWrite, true, SaveSpecial);
  101. #undef KEY
  102. }
  103. //---------------------------------------------------------------------------
  104. void __fastcall TConfiguration::LoadSpecial(THierarchicalStorage * /*Storage*/)
  105. {
  106. }
  107. //---------------------------------------------------------------------------
  108. void __fastcall TConfiguration::LoadAdmin(THierarchicalStorage * Storage)
  109. {
  110. FDisablePasswordStoring = Storage->ReadBool("DisablePasswordStoring", FDisablePasswordStoring);
  111. }
  112. //---------------------------------------------------------------------------
  113. void __fastcall TConfiguration::Load()
  114. {
  115. TGuard Guard(FCriticalSection);
  116. #define KEY(TYPE, VAR) VAR = Storage->Read ## TYPE(LASTELEM(AnsiString(#VAR)), VAR)
  117. #pragma warn -eas
  118. REGCONFIG(smRead, false, LoadSpecial);
  119. #pragma warn +eas
  120. #undef KEY
  121. TRegistryStorage * AdminStorage;
  122. AdminStorage = new TRegistryStorage(RegistryStorageKey, HKEY_LOCAL_MACHINE);
  123. try
  124. {
  125. if (AdminStorage->OpenRootKey(false))
  126. {
  127. LoadAdmin(AdminStorage);
  128. AdminStorage->CloseSubKey();
  129. }
  130. }
  131. __finally
  132. {
  133. delete AdminStorage;
  134. }
  135. }
  136. //---------------------------------------------------------------------------
  137. void __fastcall TConfiguration::LoadDirectoryChangesCache(const AnsiString SessionKey,
  138. TRemoteDirectoryChangesCache * DirectoryChangesCache)
  139. {
  140. THierarchicalStorage * Storage = CreateScpStorage(false);
  141. try
  142. {
  143. Storage->AccessMode = smRead;
  144. if (Storage->OpenSubKey(ConfigurationSubKey, false) &&
  145. Storage->OpenSubKey("CDCache", false) &&
  146. Storage->ValueExists(SessionKey))
  147. {
  148. DirectoryChangesCache->Deserialize(Storage->ReadBinaryData(SessionKey));
  149. }
  150. }
  151. __finally
  152. {
  153. delete Storage;
  154. }
  155. }
  156. //---------------------------------------------------------------------------
  157. void __fastcall TConfiguration::SaveDirectoryChangesCache(const AnsiString SessionKey,
  158. TRemoteDirectoryChangesCache * DirectoryChangesCache)
  159. {
  160. THierarchicalStorage * Storage = CreateScpStorage(false);
  161. try
  162. {
  163. Storage->AccessMode = smReadWrite;
  164. if (Storage->OpenSubKey(ConfigurationSubKey, true) &&
  165. Storage->OpenSubKey("CDCache", true))
  166. {
  167. AnsiString Data;
  168. DirectoryChangesCache->Serialize(Data);
  169. Storage->WriteBinaryData(SessionKey, Data);
  170. }
  171. }
  172. __finally
  173. {
  174. delete Storage;
  175. }
  176. }
  177. //---------------------------------------------------------------------------
  178. void __fastcall TConfiguration::Changed()
  179. {
  180. if (FUpdating == 0)
  181. {
  182. if (OnChange)
  183. {
  184. OnChange(this);
  185. }
  186. }
  187. else
  188. {
  189. FChanged = true;
  190. }
  191. }
  192. //---------------------------------------------------------------------------
  193. void __fastcall TConfiguration::BeginUpdate()
  194. {
  195. if (FUpdating == 0)
  196. {
  197. FChanged = false;
  198. }
  199. FUpdating++;
  200. // Greater value would probably indicate some nesting problem in code
  201. assert(FUpdating < 6);
  202. }
  203. //---------------------------------------------------------------------------
  204. void __fastcall TConfiguration::EndUpdate()
  205. {
  206. assert(FUpdating > 0);
  207. FUpdating--;
  208. if ((FUpdating == 0) && FChanged)
  209. {
  210. FChanged = false;
  211. Changed();
  212. }
  213. }
  214. //---------------------------------------------------------------------------
  215. void __fastcall TConfiguration::CleanupConfiguration()
  216. {
  217. try
  218. {
  219. CleanupRegistry(ConfigurationSubKey);
  220. if (Storage == stRegistry)
  221. {
  222. DontSave = true;
  223. }
  224. }
  225. catch (Exception &E)
  226. {
  227. throw ExtException(&E, CLEANUP_CONFIG_ERROR);
  228. }
  229. }
  230. //---------------------------------------------------------------------------
  231. void __fastcall TConfiguration::CleanupRegistry(AnsiString CleanupSubKey)
  232. {
  233. TRegistryStorage *Registry = new TRegistryStorage(RegistryStorageKey);
  234. try
  235. {
  236. Registry->RecursiveDeleteSubKey(CleanupSubKey);
  237. }
  238. __finally
  239. {
  240. delete Registry;
  241. }
  242. }
  243. //---------------------------------------------------------------------------
  244. void __fastcall TConfiguration::CleanupHostKeys()
  245. {
  246. try
  247. {
  248. CleanupRegistry(SshHostKeysSubKey);
  249. }
  250. catch (Exception &E)
  251. {
  252. throw ExtException(&E, CLEANUP_HOSTKEYS_ERROR);
  253. }
  254. }
  255. //---------------------------------------------------------------------------
  256. void __fastcall TConfiguration::CleanupRandomSeedFile()
  257. {
  258. try
  259. {
  260. RandomSeedSave = false;
  261. if (FileExists(RandomSeedFile))
  262. {
  263. if (!DeleteFile(RandomSeedFile)) Abort();
  264. }
  265. }
  266. catch (Exception &E)
  267. {
  268. throw ExtException(&E, CLEANUP_SEEDFILE_ERROR);
  269. }
  270. }
  271. //---------------------------------------------------------------------------
  272. void __fastcall TConfiguration::CleanupIniFile()
  273. {
  274. try
  275. {
  276. if (FileExists(IniFileStorageName))
  277. {
  278. if (!DeleteFile(IniFileStorageName)) Abort();
  279. }
  280. if (Storage == stIniFile)
  281. {
  282. DontSave = true;
  283. }
  284. }
  285. catch (Exception &E)
  286. {
  287. throw ExtException(&E, CLEANUP_INIFILE_ERROR);
  288. }
  289. }
  290. //---------------------------------------------------------------------------
  291. AnsiString __fastcall TConfiguration::GetOSVersionStr()
  292. {
  293. AnsiString Result;
  294. OSVERSIONINFO OSVersionInfo;
  295. OSVersionInfo.dwOSVersionInfoSize = sizeof(OSVersionInfo);
  296. if (GetVersionEx(&OSVersionInfo) != 0)
  297. {
  298. Result = FORMAT("%d.%d.%d %s", (int(OSVersionInfo.dwMajorVersion),
  299. int(OSVersionInfo.dwMinorVersion), int(OSVersionInfo.dwBuildNumber),
  300. OSVersionInfo.szCSDVersion)).Trim();
  301. }
  302. return Result;
  303. }
  304. //---------------------------------------------------------------------------
  305. TVSFixedFileInfo *__fastcall TConfiguration::GetFixedApplicationInfo()
  306. {
  307. return GetFixedFileInfo(ApplicationInfo);
  308. }
  309. //---------------------------------------------------------------------------
  310. AnsiString __fastcall TConfiguration::ModuleFileName()
  311. {
  312. return ParamStr(0);
  313. }
  314. //---------------------------------------------------------------------------
  315. void * __fastcall TConfiguration::GetFileApplicationInfo(const AnsiString FileName)
  316. {
  317. void * Result;
  318. if (FileName.IsEmpty())
  319. {
  320. if (!FApplicationInfo)
  321. {
  322. FApplicationInfo = CreateFileInfo(ModuleFileName());
  323. }
  324. Result = FApplicationInfo;
  325. }
  326. else
  327. {
  328. Result = CreateFileInfo(FileName);
  329. }
  330. return Result;
  331. }
  332. //---------------------------------------------------------------------------
  333. void * __fastcall TConfiguration::GetApplicationInfo()
  334. {
  335. return GetFileApplicationInfo("");
  336. }
  337. //---------------------------------------------------------------------------
  338. AnsiString __fastcall TConfiguration::GetFileProductName(const AnsiString FileName)
  339. {
  340. return GetFileFileInfoString("ProductName", FileName);
  341. }
  342. //---------------------------------------------------------------------------
  343. AnsiString __fastcall TConfiguration::GetFileCompanyName(const AnsiString FileName)
  344. {
  345. return GetFileFileInfoString("CompanyName", FileName);
  346. }
  347. //---------------------------------------------------------------------------
  348. AnsiString __fastcall TConfiguration::GetProductName()
  349. {
  350. return GetFileProductName("");
  351. }
  352. //---------------------------------------------------------------------------
  353. AnsiString __fastcall TConfiguration::GetCompanyName()
  354. {
  355. return GetFileCompanyName("");
  356. }
  357. //---------------------------------------------------------------------------
  358. AnsiString __fastcall TConfiguration::GetFileProductVersion(const AnsiString FileName)
  359. {
  360. return TrimVersion(GetFileFileInfoString("ProductVersion", FileName));
  361. }
  362. //---------------------------------------------------------------------------
  363. AnsiString __fastcall TConfiguration::GetProductVersion()
  364. {
  365. return GetFileProductVersion("");
  366. }
  367. //---------------------------------------------------------------------------
  368. AnsiString __fastcall TConfiguration::TrimVersion(AnsiString Version)
  369. {
  370. while ((Version.Pos(".") != Version.LastDelimiter(".")) &&
  371. (Version.SubString(Version.Length() - 1, 2) == ".0"))
  372. {
  373. Version.SetLength(Version.Length() - 2);
  374. }
  375. return Version;
  376. }
  377. //---------------------------------------------------------------------------
  378. AnsiString __fastcall TConfiguration::GetVersionStr()
  379. {
  380. TGuard Guard(FCriticalSection);
  381. try
  382. {
  383. return FmtLoadStr(VERSION, ARRAYOFCONST((
  384. HIWORD(FixedApplicationInfo->dwFileVersionMS),
  385. LOWORD(FixedApplicationInfo->dwFileVersionMS),
  386. HIWORD(FixedApplicationInfo->dwFileVersionLS),
  387. LOWORD(FixedApplicationInfo->dwFileVersionLS))));
  388. }
  389. catch (Exception &E)
  390. {
  391. throw ExtException(&E, "Can't get application version");
  392. }
  393. }
  394. //---------------------------------------------------------------------------
  395. AnsiString __fastcall TConfiguration::GetVersion()
  396. {
  397. TGuard Guard(FCriticalSection);
  398. try
  399. {
  400. AnsiString Result;
  401. Result = TrimVersion(FORMAT("%d.%d.%d", (
  402. HIWORD(FixedApplicationInfo->dwFileVersionMS),
  403. LOWORD(FixedApplicationInfo->dwFileVersionMS),
  404. HIWORD(FixedApplicationInfo->dwFileVersionLS))));
  405. return Result;
  406. }
  407. catch (Exception &E)
  408. {
  409. throw ExtException(&E, "Can't get application version");
  410. }
  411. }
  412. //---------------------------------------------------------------------------
  413. AnsiString __fastcall TConfiguration::GetFileFileInfoString(const AnsiString Key,
  414. const AnsiString FileName)
  415. {
  416. TGuard Guard(FCriticalSection);
  417. AnsiString Result;
  418. void * Info = GetFileApplicationInfo(FileName);
  419. try
  420. {
  421. if ((Info != NULL) && (GetTranslationCount(Info) > 0))
  422. {
  423. TTranslation Translation;
  424. Translation = GetTranslation(Info, 0);
  425. Result = ::GetFileInfoString(Info, Translation, Key);
  426. }
  427. else
  428. {
  429. assert(!FileName.IsEmpty());
  430. }
  431. }
  432. __finally
  433. {
  434. if (!FileName.IsEmpty())
  435. {
  436. FreeFileInfo(Info);
  437. }
  438. }
  439. return Result;
  440. }
  441. //---------------------------------------------------------------------------
  442. AnsiString __fastcall TConfiguration::GetFileInfoString(const AnsiString Key)
  443. {
  444. return GetFileFileInfoString(Key, "");
  445. }
  446. //---------------------------------------------------------------------------
  447. AnsiString __fastcall TConfiguration::GetRegistryStorageKey()
  448. {
  449. return GetRegistryKey();
  450. }
  451. //---------------------------------------------------------------------------
  452. void __fastcall TConfiguration::SetIniFileStorageName(AnsiString value)
  453. {
  454. if (!value.IsEmpty() && !FileExists(value))
  455. {
  456. throw Exception(FMTLOAD(FILE_NOT_EXISTS, (value)));
  457. }
  458. FIniFileStorageName = value;
  459. FStorage = stIniFile;
  460. }
  461. //---------------------------------------------------------------------------
  462. AnsiString __fastcall TConfiguration::GetIniFileStorageName()
  463. {
  464. if (FIniFileStorageName.IsEmpty())
  465. {
  466. return ChangeFileExt(ParamStr(0), ".ini");
  467. }
  468. else
  469. {
  470. return FIniFileStorageName;
  471. }
  472. }
  473. //---------------------------------------------------------------------------
  474. AnsiString __fastcall TConfiguration::GetPuttyRegistryStorageKey()
  475. {
  476. return PUTTY_REG_POS;
  477. }
  478. //---------------------------------------------------------------------------
  479. AnsiString __fastcall TConfiguration::GetPuttySessionsKey()
  480. {
  481. return PuttyRegistryStorageKey + "\\Sessions";
  482. }
  483. //---------------------------------------------------------------------------
  484. AnsiString __fastcall TConfiguration::GetStoredSessionsSubKey()
  485. {
  486. return "Sessions";
  487. }
  488. //---------------------------------------------------------------------------
  489. AnsiString __fastcall TConfiguration::GetSshHostKeysSubKey()
  490. {
  491. return "SshHostKeys";
  492. }
  493. //---------------------------------------------------------------------------
  494. AnsiString __fastcall TConfiguration::GetConfigurationSubKey()
  495. {
  496. return "Configuration";
  497. }
  498. //---------------------------------------------------------------------------
  499. AnsiString __fastcall TConfiguration::GetRootKeyStr()
  500. {
  501. return RootKeyToStr(HKEY_CURRENT_USER);
  502. }
  503. //---------------------------------------------------------------------------
  504. bool __fastcall TConfiguration::GetGSSAPIInstalled()
  505. {
  506. if (FGSSAPIInstalled < 0)
  507. {
  508. HINSTANCE Library = LoadLibrary(GSSAPIDLL);
  509. FGSSAPIInstalled = (Library != NULL ? 1 : 0);
  510. FreeLibrary(Library);
  511. }
  512. return (FGSSAPIInstalled > 0);
  513. }
  514. //---------------------------------------------------------------------------
  515. void __fastcall TConfiguration::SetStorage(TStorage value)
  516. {
  517. if (FStorage != value)
  518. {
  519. FStorage = value;
  520. ModifyAll();
  521. Save();
  522. }
  523. }
  524. //---------------------------------------------------------------------------
  525. void __fastcall TConfiguration::ModifyAll()
  526. {
  527. // nothing
  528. }
  529. //---------------------------------------------------------------------------
  530. TStorage __fastcall TConfiguration::GetStorage()
  531. {
  532. if (FStorage == stDetect)
  533. {
  534. FStorage = FileExists(IniFileStorageName) ? stIniFile : stRegistry;
  535. }
  536. return FStorage;
  537. }
  538. //---------------------------------------------------------------------------
  539. void __fastcall TConfiguration::SetRandomSeedFile(AnsiString value)
  540. {
  541. char *seedpath = seedpath_ptr();
  542. if (value.Length() > seedpath_size())
  543. {
  544. value.SetLength(seedpath_size());
  545. }
  546. strcpy(seedpath, StripPathQuotes(value).c_str());
  547. }
  548. //---------------------------------------------------------------------------
  549. AnsiString __fastcall TConfiguration::GetRandomSeedFile()
  550. {
  551. return AnsiString(seedpath_ptr());
  552. }
  553. //---------------------------------------------------------------------------
  554. TEOLType __fastcall TConfiguration::GetLocalEOLType()
  555. {
  556. return eolCRLF;
  557. }
  558. //---------------------------------------------------------------------
  559. void __fastcall TConfiguration::SetLogging(bool value)
  560. {
  561. SET_CONFIG_PROPERTY(Logging);
  562. }
  563. //---------------------------------------------------------------------
  564. void __fastcall TConfiguration::SetLogFileName(AnsiString value)
  565. {
  566. SET_CONFIG_PROPERTY(LogFileName);
  567. }
  568. //---------------------------------------------------------------------
  569. void __fastcall TConfiguration::SetLogToFile(bool value)
  570. {
  571. if (value != LogToFile)
  572. {
  573. LogFileName = value ? DefaultLogFileName : AnsiString("");
  574. Changed();
  575. }
  576. }
  577. //---------------------------------------------------------------------
  578. bool __fastcall TConfiguration::GetLogToFile()
  579. {
  580. return !LogFileName.IsEmpty();
  581. }
  582. //---------------------------------------------------------------------
  583. void __fastcall TConfiguration::SetLogFileAppend(bool value)
  584. {
  585. SET_CONFIG_PROPERTY(LogFileAppend);
  586. }
  587. //---------------------------------------------------------------------
  588. void __fastcall TConfiguration::SetLogWindowLines(int value)
  589. {
  590. SET_CONFIG_PROPERTY(LogWindowLines);
  591. }
  592. //---------------------------------------------------------------------
  593. void __fastcall TConfiguration::SetLogWindowComplete(bool value)
  594. {
  595. if (value != LogWindowComplete)
  596. {
  597. LogWindowLines = value ? 0 : 50;
  598. Changed();
  599. }
  600. }
  601. //---------------------------------------------------------------------
  602. bool __fastcall TConfiguration::GetLogWindowComplete()
  603. {
  604. return (bool)(LogWindowLines == 0);
  605. }
  606. //---------------------------------------------------------------------
  607. AnsiString __fastcall TConfiguration::GetDefaultLogFileName()
  608. {
  609. return GetTemporaryPath() + "winscp.log";
  610. }
  611. //---------------------------------------------------------------------------
  612. void __fastcall TConfiguration::SetConfirmOverwriting(bool value)
  613. {
  614. TGuard Guard(FCriticalSection);
  615. SET_CONFIG_PROPERTY(ConfirmOverwriting);
  616. }
  617. //---------------------------------------------------------------------------
  618. bool __fastcall TConfiguration::GetConfirmOverwriting()
  619. {
  620. TGuard Guard(FCriticalSection);
  621. return FConfirmOverwriting;
  622. }
  623. //---------------------------------------------------------------------------
  624. AnsiString __fastcall TConfiguration::GetTimeFormat()
  625. {
  626. return "h:nn:ss";
  627. }
  628. //---------------------------------------------------------------------------
  629. AnsiString __fastcall TConfiguration::GetPartialExt() const
  630. {
  631. return ".filepart";
  632. }
  633. //---------------------------------------------------------------------------
  634. AnsiString __fastcall TConfiguration::GetDefaultKeyFile()
  635. {
  636. return "";
  637. }
  638. //---------------------------------------------------------------------------
  639. AnsiString __fastcall TConfiguration::GetLocalInvalidChars()
  640. {
  641. return "/\\:*?\"<>|";
  642. }