registry.pp 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924
  1. unit Registry;
  2. {$mode objfpc}
  3. interface
  4. uses
  5. Classes, SysUtils;
  6. type
  7. HKEY = Integer;
  8. PHKEY = ^HKEY;
  9. ERegistryException = class(Exception);
  10. TRegKeyInfo = record
  11. NumSubKeys: Integer;
  12. MaxSubKeyLen: Integer;
  13. NumValues: Integer;
  14. MaxValueLen: Integer;
  15. MaxDataLen: Integer;
  16. //FileTime: TFileTime;
  17. end;
  18. TRegDataType = (rdUnknown, rdString, rdExpandString, rdInteger, rdBinary);
  19. TRegDataInfo = record
  20. RegData: TRegDataType;
  21. DataSize: Integer;
  22. end;
  23. { TRegistry }
  24. {
  25. @abstract(Class to provide access to a registry.)
  26. Introduced by Curtis White
  27. Currently maintained by Curtis White
  28. }
  29. TRegistry = class(TObject)
  30. private
  31. fCurrentKey: HKEY;
  32. fRootKey: HKEY;
  33. fLazyWrite: Boolean;
  34. fCurrentPath: string;
  35. //fCloseRootKey: Boolean;
  36. procedure SetRootKey(Value: HKEY);
  37. protected
  38. function GetBaseKey(Relative: Boolean): HKey;
  39. function GetData(const Name: string; Buffer: Pointer;
  40. BufSize: Integer; var RegData: TRegDataType): Integer;
  41. function GetKey(const Key: string): HKEY;
  42. procedure ChangeKey(Value: HKey; const Path: string);
  43. procedure PutData(const Name: string; Buffer: Pointer;
  44. BufSize: Integer; RegData: TRegDataType);
  45. procedure SetCurrentKey(Value: HKEY);
  46. public
  47. constructor Create;
  48. destructor Destroy; override;
  49. function CreateKey(const Key: string): Boolean;
  50. function DeleteKey(const Key: string): Boolean;
  51. function DeleteValue(const Name: string): Boolean;
  52. function GetDataInfo(const ValueName: string; var Value: TRegDataInfo): Boolean;
  53. function GetDataSize(const ValueName: string): Integer;
  54. function GetDataType(const ValueName: string): TRegDataType;
  55. function GetKeyInfo(var Value: TRegKeyInfo): Boolean;
  56. function HasSubKeys: Boolean;
  57. function KeyExists(const Key: string): Boolean;
  58. function LoadKey(const Key, FileName: string): Boolean;
  59. function OpenKey(const Key: string; CanCreate: Boolean): Boolean;
  60. //function ReadCurrency(const Name: string): Currency;
  61. function ReadBinaryData(const Name: string; var Buffer; BufSize: Integer): Integer;
  62. function ReadBool(const Name: string): Boolean;
  63. function ReadDate(const Name: string): TDateTime;
  64. function ReadDateTime(const Name: string): TDateTime;
  65. function ReadFloat(const Name: string): Double;
  66. function ReadInteger(const Name: string): Integer;
  67. function ReadString(const Name: string): string;
  68. function ReadTime(const Name: string): TDateTime;
  69. function RegistryConnect(const UNCName: string): Boolean;
  70. function ReplaceKey(const Key, FileName, BackUpFileName: string): Boolean;
  71. function RestoreKey(const Key, FileName: string): Boolean;
  72. function SaveKey(const Key, FileName: string): Boolean;
  73. function UnLoadKey(const Key: string): Boolean;
  74. function ValueExists(const Name: string): Boolean;
  75. procedure CloseKey;
  76. procedure GetKeyNames(Strings: TStrings);
  77. procedure GetValueNames(Strings: TStrings);
  78. procedure MoveKey(const OldName, NewName: string; Delete: Boolean);
  79. procedure RenameValue(const OldName, NewName: string);
  80. //procedure WriteCurrency(const Name: string; Value: Currency);
  81. procedure WriteBinaryData(const Name: string; var Buffer; BufSize: Integer);
  82. procedure WriteBool(const Name: string; Value: Boolean);
  83. procedure WriteDate(const Name: string; Value: TDateTime);
  84. procedure WriteDateTime(const Name: string; Value: TDateTime);
  85. procedure WriteFloat(const Name: string; Value: Double);
  86. procedure WriteInteger(const Name: string; Value: Integer);
  87. procedure WriteString(const Name, Value: string);
  88. procedure WriteExpandString(const Name, Value: string);
  89. procedure WriteTime(const Name: string; Value: TDateTime);
  90. property CurrentKey: HKEY read fCurrentKey;
  91. property CurrentPath: string read fCurrentPath;
  92. property LazyWrite: Boolean read fLazyWrite write fLazyWrite;
  93. property RootKey: HKEY read fRootKey write SetRootKey;
  94. end;
  95. { TRegIniFile }
  96. {
  97. @abstract(Class to provide access to a registry in an Ini file manner.)
  98. Introduced by Curtis White
  99. Currently maintained by Curtis White
  100. }
  101. TRegIniFile = class(TRegistry)
  102. private
  103. fFileName: String;
  104. public
  105. constructor Create(const FN: string);
  106. function ReadString(const Section, Ident, Default: string): string;
  107. function ReadInteger(const Section, Ident: string;
  108. Default: Longint): Longint;
  109. function ReadBool(const Section, Ident: string; Default: Boolean): Boolean;
  110. procedure WriteString(const Section, Ident, Value: String);
  111. procedure WriteInteger(const Section, Ident: string; Value: Longint);
  112. procedure WriteBool(const Section, Ident: string; Value: Boolean);
  113. procedure ReadSection(const Section: string; Strings: TStrings);
  114. procedure ReadSections(Strings: TStrings);
  115. procedure ReadSectionValues(const Section: string; Strings: TStrings);
  116. procedure EraseSection(const Section: string);
  117. procedure DeleteKey(const Section, Ident: String);
  118. property FileName: String read fFileName;
  119. end;
  120. implementation
  121. {******************************************************************************
  122. TRegistry
  123. ******************************************************************************}
  124. {------------------------------------------------------------------------------
  125. Method: TRegistry.Create
  126. Params: None
  127. Returns: Nothing
  128. Constructor for the class.
  129. ------------------------------------------------------------------------------}
  130. constructor TRegistry.Create;
  131. begin
  132. inherited Create;
  133. end;
  134. {------------------------------------------------------------------------------
  135. Method: TRegistry.Destroy
  136. Params: None
  137. Returns: Nothing
  138. Destructor for the class.
  139. ------------------------------------------------------------------------------}
  140. destructor TRegistry.Destroy;
  141. begin
  142. inherited Destroy;
  143. end;
  144. {------------------------------------------------------------------------------
  145. Function: TRegistry.CreateKey
  146. Params: Key: String key to create
  147. Returns: Boolean containing result of the create. True if it succeeded.
  148. Create a registry key.
  149. ------------------------------------------------------------------------------}
  150. function TRegistry.CreateKey(const Key: String): Boolean;
  151. begin
  152. Result := True;
  153. end;
  154. {------------------------------------------------------------------------------
  155. Function: TRegistry.DeleteKey
  156. Params: Key: String key to create
  157. Returns: Boolean containing result of the delete. True if it succeeded.
  158. Delete a registry key.
  159. ------------------------------------------------------------------------------}
  160. function TRegistry.DeleteKey(const Key: String): Boolean;
  161. begin
  162. Result := True;
  163. end;
  164. {------------------------------------------------------------------------------
  165. Function: TRegistry.DeleteValue
  166. Params: Name: Name of key of which to delete its value
  167. Returns: Boolean containing result of the function. True if it succeeded.
  168. Delete the value for a registry key.
  169. ------------------------------------------------------------------------------}
  170. function TRegistry.DeleteValue(const Name: String): Boolean;
  171. begin
  172. Result := True;
  173. end;
  174. {------------------------------------------------------------------------------
  175. Function: TRegistry.GetBaseKey
  176. Params: Relative: Is the key relative or absolute. True if relative.
  177. Returns: HKey containing the base key.
  178. Gets the base key.
  179. ------------------------------------------------------------------------------}
  180. function TRegistry.GetBaseKey(Relative: Boolean): HKey;
  181. begin
  182. Result := CurrentKey;
  183. end;
  184. {------------------------------------------------------------------------------
  185. Function: TRegistry.GetData
  186. Params: Name: name of the key
  187. Buffer:
  188. BufSize:
  189. RegData:
  190. Returns: Integer containing output from the function.
  191. Gets data from the registry.
  192. ------------------------------------------------------------------------------}
  193. function TRegistry.GetData(const Name: String; Buffer: Pointer;
  194. BufSize: Integer; var RegData: TRegDataType): Integer;
  195. begin
  196. Result := 0;
  197. end;
  198. {------------------------------------------------------------------------------
  199. Function: TRegistry.GetDataInfo
  200. Params: ValueName: name of the value to get info on
  201. Value:
  202. Returns: Boolean containing result of the function. True if it succeeded.
  203. Get info on the data value.
  204. ------------------------------------------------------------------------------}
  205. function TRegistry.GetDataInfo(const ValueName: String; var Value: TRegDataInfo): Boolean;
  206. begin
  207. Result := True;
  208. end;
  209. {------------------------------------------------------------------------------
  210. Function: TRegistry.GetDataSize
  211. Params: ValueName: name of the value to get info on
  212. Returns: Integer containing the size of the value.
  213. Get the size of the data value.
  214. ------------------------------------------------------------------------------}
  215. function TRegistry.GetDataSize(const ValueName: String): Integer;
  216. begin
  217. Result := 0;
  218. end;
  219. {------------------------------------------------------------------------------
  220. Function: TRegistry.GetDataType
  221. Params: ValueName: name of the value to get info on
  222. Returns: TRegDataType containing type of the value.
  223. Get the type of the data value.
  224. ------------------------------------------------------------------------------}
  225. function TRegistry.GetDataType(const ValueName: string): TRegDataType;
  226. begin
  227. Result := rdUnknown;
  228. end;
  229. {------------------------------------------------------------------------------
  230. Function: TRegistry.GetKey
  231. Params: Key: key to get
  232. Returns: HKey containing the key.
  233. Get a key from the registry.
  234. ------------------------------------------------------------------------------}
  235. function TRegistry.GetKey(const Key: String): HKEY;
  236. begin
  237. Result := 0;
  238. end;
  239. {------------------------------------------------------------------------------
  240. Function: TRegistry.GetKeyInfo
  241. Params: Value: value of info to get key info on
  242. Returns: Boolean containing result of the function. True if it succeeded.
  243. Get the info of a key.
  244. ------------------------------------------------------------------------------}
  245. function TRegistry.GetKeyInfo(var Value: TRegKeyInfo): Boolean;
  246. begin
  247. Result := True;
  248. end;
  249. {------------------------------------------------------------------------------
  250. Function: TRegistry.HasSubKeys
  251. Params: None
  252. Returns: Boolean containing result of the function. True if there are sub
  253. keys.
  254. See if the key has sub keys.
  255. ------------------------------------------------------------------------------}
  256. function TRegistry.HasSubKeys: Boolean;
  257. begin
  258. Result := True;
  259. end;
  260. {------------------------------------------------------------------------------
  261. Function: TRegistry.KeyExists
  262. Params: Key: the name of the key
  263. Returns: Boolean containing result of the function. True if the key exists.
  264. Check to see if a key exists.
  265. ------------------------------------------------------------------------------}
  266. function TRegistry.KeyExists(const Key: string): Boolean;
  267. begin
  268. Result := True;
  269. end;
  270. {------------------------------------------------------------------------------
  271. Function: TRegistry.LoadKey
  272. Params: Key: the name of the key
  273. FileName: file containing the key to load
  274. Returns: Boolean containing result of the function. True if it succeeded.
  275. Load a key from a file.
  276. ------------------------------------------------------------------------------}
  277. function TRegistry.LoadKey(const Key, FileName: string): Boolean;
  278. begin
  279. Result := True;
  280. end;
  281. {------------------------------------------------------------------------------
  282. Function: TRegistry.OpenKey
  283. Params: Key: the name of the key
  284. CanCreate: create the key if it does not exist. True to create
  285. Returns: Boolean containing result of the function. True if it succeeded.
  286. Open a key and optionally create it if is does not exist.
  287. ------------------------------------------------------------------------------}
  288. function TRegistry.OpenKey(const Key: string; CanCreate: Boolean): Boolean;
  289. begin
  290. Result := True;
  291. end;
  292. {------------------------------------------------------------------------------
  293. Function: TRegistry.ReadBinaryData
  294. Params: AOwner: the owner of the class
  295. Returns: String containing output from the function.
  296. Description of the function for the class.
  297. ------------------------------------------------------------------------------}
  298. function TRegistry.ReadBinaryData(const Name: string; var Buffer; BufSize: Integer): Integer;
  299. begin
  300. Result := 0;
  301. end;
  302. {------------------------------------------------------------------------------
  303. Function: TRegistry.ReadBool
  304. Params: AOwner: the owner of the class
  305. Returns: String containing output from the function.
  306. Description of the function for the class.
  307. ------------------------------------------------------------------------------}
  308. function TRegistry.ReadBool(const Name: string): Boolean;
  309. begin
  310. Result := True;
  311. end;
  312. {------------------------------------------------------------------------------
  313. Function: TRegistry.ReadCurrency
  314. Params: AOwner: the owner of the class
  315. Returns: String containing output from the function.
  316. Description of the function for the class.
  317. ------------------------------------------------------------------------------}
  318. {function TRegistry.ReadCurrency(const Name: string): Currency;
  319. begin
  320. Result := 0.0;
  321. end;}
  322. {------------------------------------------------------------------------------
  323. Function: TRegistry.ReadDate
  324. Params: AOwner: the owner of the class
  325. Returns: String containing output from the function.
  326. Description of the function for the class.
  327. ------------------------------------------------------------------------------}
  328. function TRegistry.ReadDate(const Name: string): TDateTime;
  329. begin
  330. Result := now;
  331. end;
  332. {------------------------------------------------------------------------------
  333. Function: TRegistry.ReadDateTime
  334. Params: AOwner: the owner of the class
  335. Returns: String containing output from the function.
  336. Description of the function for the class.
  337. ------------------------------------------------------------------------------}
  338. function TRegistry.ReadDateTime(const Name: string): TDateTime;
  339. begin
  340. Result := now;
  341. end;
  342. {------------------------------------------------------------------------------
  343. Function: TRegistry.ReadFloat
  344. Params: AOwner: the owner of the class
  345. Returns: String containing output from the function.
  346. Description of the function for the class.
  347. ------------------------------------------------------------------------------}
  348. function TRegistry.ReadFloat(const Name: string): Double;
  349. begin
  350. Result := 0.0;
  351. end;
  352. {------------------------------------------------------------------------------
  353. Function: TRegistry.ReadInteger
  354. Params: AOwner: the owner of the class
  355. Returns: String containing output from the function.
  356. Description of the function for the class.
  357. ------------------------------------------------------------------------------}
  358. function TRegistry.ReadInteger(const Name: string): Integer;
  359. begin
  360. Result := 0;
  361. end;
  362. {------------------------------------------------------------------------------
  363. Function: TRegistry.ReadString
  364. Params: AOwner: the owner of the class
  365. Returns: String containing output from the function.
  366. Description of the function for the class.
  367. ------------------------------------------------------------------------------}
  368. function TRegistry.ReadString(const Name: string): string;
  369. begin
  370. Result := '';
  371. end;
  372. {------------------------------------------------------------------------------
  373. Function: TRegistry.ReadTime
  374. Params: AOwner: the owner of the class
  375. Returns: String containing output from the function.
  376. Description of the function for the class.
  377. ------------------------------------------------------------------------------}
  378. function TRegistry.ReadTime(const Name: string): TDateTime;
  379. begin
  380. Result := now;
  381. end;
  382. {------------------------------------------------------------------------------
  383. Function: TRegistry.RegistryConnect
  384. Params: AOwner: the owner of the class
  385. Returns: String containing output from the function.
  386. Description of the function for the class.
  387. ------------------------------------------------------------------------------}
  388. function TRegistry.RegistryConnect(const UNCName: string): Boolean;
  389. begin
  390. Result := True;
  391. end;
  392. {------------------------------------------------------------------------------
  393. Function: TRegistry.ReplaceKey
  394. Params: AOwner: the owner of the class
  395. Returns: String containing output from the function.
  396. Description of the function for the class.
  397. ------------------------------------------------------------------------------}
  398. function TRegistry.ReplaceKey(const Key, FileName, BackUpFileName: string): Boolean;
  399. begin
  400. Result := True;
  401. end;
  402. {------------------------------------------------------------------------------
  403. Function: TRegistry.RestoreKey
  404. Params: AOwner: the owner of the class
  405. Returns: String containing output from the function.
  406. Description of the function for the class.
  407. ------------------------------------------------------------------------------}
  408. function TRegistry.RestoreKey(const Key, FileName: string): Boolean;
  409. begin
  410. Result := True;
  411. end;
  412. {------------------------------------------------------------------------------
  413. Function: TRegistry.SaveKey
  414. Params: AOwner: the owner of the class
  415. Returns: String containing output from the function.
  416. Description of the function for the class.
  417. ------------------------------------------------------------------------------}
  418. function TRegistry.SaveKey(const Key, FileName: string): Boolean;
  419. begin
  420. Result := True;
  421. end;
  422. {------------------------------------------------------------------------------
  423. Function: TRegistry.UnLoadKey
  424. Params: AOwner: the owner of the class
  425. Returns: String containing output from the function.
  426. Description of the function for the class.
  427. ------------------------------------------------------------------------------}
  428. function TRegistry.UnLoadKey(const Key: string): Boolean;
  429. begin
  430. Result := True;
  431. end;
  432. {------------------------------------------------------------------------------
  433. Function: TRegistry.ValueExists
  434. Params: AOwner: the owner of the class
  435. Returns: String containing output from the function.
  436. Description of the function for the class.
  437. ------------------------------------------------------------------------------}
  438. function TRegistry.ValueExists(const Name: string): Boolean;
  439. begin
  440. Result := True;
  441. end;
  442. {------------------------------------------------------------------------------
  443. Method: TRegistry.CloseKey
  444. Params: AOwner: the owner of the class
  445. Returns: Nothing
  446. Description of the procedure for the class.
  447. ------------------------------------------------------------------------------}
  448. procedure TRegistry.CloseKey;
  449. begin
  450. end;
  451. {------------------------------------------------------------------------------
  452. Method: TRegistry.ChangeKey
  453. Params: AOwner: the owner of the class
  454. Returns: Nothing
  455. Description of the procedure for the class.
  456. ------------------------------------------------------------------------------}
  457. procedure TRegistry.ChangeKey(Value: HKey; const Path: String);
  458. begin
  459. end;
  460. {------------------------------------------------------------------------------
  461. Method: TRegistry.GetKeyName
  462. Params: AOwner: the owner of the class
  463. Returns: Nothing
  464. Description of the procedure for the class.
  465. ------------------------------------------------------------------------------}
  466. procedure TRegistry.GetKeyNames(Strings: TStrings);
  467. begin
  468. end;
  469. {------------------------------------------------------------------------------
  470. Method: TRegistry.GetValueNames
  471. Params: AOwner: the owner of the class
  472. Returns: Nothing
  473. Description of the procedure for the class.
  474. ------------------------------------------------------------------------------}
  475. procedure TRegistry.GetValueNames(Strings: TStrings);
  476. begin
  477. end;
  478. {------------------------------------------------------------------------------
  479. Method: TRegistry.MoveKey
  480. Params: AOwner: the owner of the class
  481. Returns: Nothing
  482. Description of the procedure for the class.
  483. ------------------------------------------------------------------------------}
  484. procedure TRegistry.MoveKey(const OldName, NewName: string; Delete: Boolean);
  485. begin
  486. end;
  487. {------------------------------------------------------------------------------
  488. Method: TRegistry.PutData
  489. Params: AOwner: the owner of the class
  490. Returns: Nothing
  491. Description of the procedure for the class.
  492. ------------------------------------------------------------------------------}
  493. procedure TRegistry.PutData(const Name: string; Buffer: Pointer;
  494. BufSize: Integer; RegData: TRegDataType);
  495. begin
  496. end;
  497. {------------------------------------------------------------------------------
  498. Method: TRegistry.RenameValue
  499. Params: AOwner: the owner of the class
  500. Returns: Nothing
  501. Description of the procedure for the class.
  502. ------------------------------------------------------------------------------}
  503. procedure TRegistry.RenameValue(const OldName, NewName: string);
  504. begin
  505. end;
  506. {------------------------------------------------------------------------------
  507. Method: TRegistry.SetCurrentKey
  508. Params: AOwner: the owner of the class
  509. Returns: Nothing
  510. Description of the procedure for the class.
  511. ------------------------------------------------------------------------------}
  512. procedure TRegistry.SetCurrentKey(Value: HKEY);
  513. begin
  514. fCurrentKey := Value;
  515. end;
  516. {------------------------------------------------------------------------------
  517. Method: TRegistry.SetRootKey
  518. Params: AOwner: the owner of the class
  519. Returns: Nothing
  520. Description of the procedure for the class.
  521. ------------------------------------------------------------------------------}
  522. procedure TRegistry.SetRootKey(Value: HKEY);
  523. begin
  524. end;
  525. {------------------------------------------------------------------------------
  526. Method: TRegistry.WriteBinaryData
  527. Params: AOwner: the owner of the class
  528. Returns: Nothing
  529. Description of the procedure for the class.
  530. ------------------------------------------------------------------------------}
  531. procedure TRegistry.WriteBinaryData(const Name: string; var Buffer; BufSize: Integer);
  532. begin
  533. end;
  534. {------------------------------------------------------------------------------
  535. Method: TRegistry.WriteBool
  536. Params: AOwner: the owner of the class
  537. Returns: Nothing
  538. Description of the procedure for the class.
  539. ------------------------------------------------------------------------------}
  540. procedure TRegistry.WriteBool(const Name: string; Value: Boolean);
  541. begin
  542. end;
  543. {------------------------------------------------------------------------------
  544. Method: TRegistry.WriteCurrency
  545. Params: AOwner: the owner of the class
  546. Returns: Nothing
  547. Description of the procedure for the class.
  548. ------------------------------------------------------------------------------}
  549. {procedure TRegistry.WriteCurrency(const Name: string; Value: Currency);
  550. begin
  551. end;}
  552. {------------------------------------------------------------------------------
  553. Method: TRegistry.WriteDate
  554. Params: AOwner: the owner of the class
  555. Returns: Nothing
  556. Description of the procedure for the class.
  557. ------------------------------------------------------------------------------}
  558. procedure TRegistry.WriteDate(const Name: string; Value: TDateTime);
  559. begin
  560. end;
  561. {------------------------------------------------------------------------------
  562. Method: TRegistry.WriteDateTime
  563. Params: AOwner: the owner of the class
  564. Returns: Nothing
  565. Description of the procedure for the class.
  566. ------------------------------------------------------------------------------}
  567. procedure TRegistry.WriteDateTime(const Name: string; Value: TDateTime);
  568. begin
  569. end;
  570. {------------------------------------------------------------------------------
  571. Method: TRegistry.WriteExpandString
  572. Params: AOwner: the owner of the class
  573. Returns: Nothing
  574. Description of the procedure for the class.
  575. ------------------------------------------------------------------------------}
  576. procedure TRegistry.WriteExpandString(const Name, Value: string);
  577. begin
  578. end;
  579. {------------------------------------------------------------------------------
  580. Method: TRegistry.WriteFloat
  581. Params: AOwner: the owner of the class
  582. Returns: Nothing
  583. Description of the procedure for the class.
  584. ------------------------------------------------------------------------------}
  585. procedure TRegistry.WriteFloat(const Name: string; Value: Double);
  586. begin
  587. end;
  588. {------------------------------------------------------------------------------
  589. Method: TRegistry.WriteInteger
  590. Params: AOwner: the owner of the class
  591. Returns: Nothing
  592. Description of the procedure for the class.
  593. ------------------------------------------------------------------------------}
  594. procedure TRegistry.WriteInteger(const Name: string; Value: Integer);
  595. begin
  596. end;
  597. {------------------------------------------------------------------------------
  598. Method: TRegistry.WriteString
  599. Params: AOwner: the owner of the class
  600. Returns: Nothing
  601. Description of the procedure for the class.
  602. ------------------------------------------------------------------------------}
  603. procedure TRegistry.WriteString(const Name, Value: string);
  604. begin
  605. end;
  606. {------------------------------------------------------------------------------
  607. Method: TRegistry.WriteTime
  608. Params: AOwner: the owner of the class
  609. Returns: Nothing
  610. Description of the procedure for the class.
  611. ------------------------------------------------------------------------------}
  612. procedure TRegistry.WriteTime(const Name: string; Value: TDateTime);
  613. begin
  614. end;
  615. {******************************************************************************
  616. TRegIniFile
  617. ******************************************************************************}
  618. {------------------------------------------------------------------------------
  619. Method: TRegIniFile.Create
  620. Params: None
  621. Returns: Nothing
  622. Constructor for the class.
  623. ------------------------------------------------------------------------------}
  624. constructor TRegIniFile.Create(const FN: String);
  625. begin
  626. inherited Create;
  627. fFileName := FN;
  628. end;
  629. {------------------------------------------------------------------------------
  630. Method: TRegIniFile.MyMethod
  631. Params: AOwner: the owner of the class
  632. Returns: Nothing
  633. Description of the procedure for the class.
  634. ------------------------------------------------------------------------------}
  635. procedure TRegIniFile.DeleteKey(const Section, Ident: String);
  636. begin
  637. end;
  638. {------------------------------------------------------------------------------
  639. Method: TRegIniFile.MyMethod
  640. Params: AOwner: the owner of the class
  641. Returns: Nothing
  642. Description of the procedure for the class.
  643. ------------------------------------------------------------------------------}
  644. procedure TRegIniFile.EraseSection(const Section: string);
  645. begin
  646. end;
  647. {------------------------------------------------------------------------------
  648. Method: TRegIniFile.MyMethod
  649. Params: AOwner: the owner of the class
  650. Returns: Nothing
  651. Description of the procedure for the class.
  652. ------------------------------------------------------------------------------}
  653. procedure TRegIniFile.ReadSection(const Section: string; Strings: TStrings);
  654. begin
  655. end;
  656. {------------------------------------------------------------------------------
  657. Method: TRegIniFile.MyMethod
  658. Params: AOwner: the owner of the class
  659. Returns: Nothing
  660. Description of the procedure for the class.
  661. ------------------------------------------------------------------------------}
  662. procedure TRegIniFile.ReadSections(Strings: TStrings);
  663. begin
  664. end;
  665. {------------------------------------------------------------------------------
  666. Method: TRegIniFile.MyMethod
  667. Params: AOwner: the owner of the class
  668. Returns: Nothing
  669. Description of the procedure for the class.
  670. ------------------------------------------------------------------------------}
  671. procedure TRegIniFile.ReadSectionValues(const Section: string; Strings: TStrings);
  672. begin
  673. end;
  674. {------------------------------------------------------------------------------
  675. Method: TRegIniFile.MyMethod
  676. Params: AOwner: the owner of the class
  677. Returns: Nothing
  678. Description of the procedure for the class.
  679. ------------------------------------------------------------------------------}
  680. procedure TRegIniFile.WriteBool(const Section, Ident: string; Value: Boolean);
  681. begin
  682. end;
  683. {------------------------------------------------------------------------------
  684. Method: TRegIniFile.MyMethod
  685. Params: AOwner: the owner of the class
  686. Returns: Nothing
  687. Description of the procedure for the class.
  688. ------------------------------------------------------------------------------}
  689. procedure TRegIniFile.WriteInteger(const Section, Ident: string; Value: LongInt);
  690. begin
  691. end;
  692. {------------------------------------------------------------------------------
  693. Method: TRegIniFile.MyMethod
  694. Params: AOwner: the owner of the class
  695. Returns: Nothing
  696. Description of the procedure for the class.
  697. ------------------------------------------------------------------------------}
  698. procedure TRegIniFile.WriteString(const Section, Ident, Value: String);
  699. begin
  700. end;
  701. {------------------------------------------------------------------------------
  702. Function: TRegIniFile.MyFunction
  703. Params: AOwner: the owner of the class
  704. Returns: String containing output from the function.
  705. Description of the function for the class.
  706. ------------------------------------------------------------------------------}
  707. function TRegIniFile.ReadBool(const Section, Ident: string; Default: Boolean): Boolean;
  708. begin
  709. Result := Default;
  710. end;
  711. {------------------------------------------------------------------------------
  712. Function: TRegIniFile.MyFunction
  713. Params: AOwner: the owner of the class
  714. Returns: String containing output from the function.
  715. Description of the function for the class.
  716. ------------------------------------------------------------------------------}
  717. function TRegIniFile.ReadInteger(const Section, Ident: string; Default: LongInt): LongInt;
  718. begin
  719. Result := Default;
  720. end;
  721. {------------------------------------------------------------------------------
  722. Function: TRegIniFile.MyFunction
  723. Params: AOwner: the owner of the class
  724. Returns: String containing output from the function.
  725. Description of the function for the class.
  726. ------------------------------------------------------------------------------}
  727. function TRegIniFile.ReadString(const Section, Ident, Default: String): String;
  728. begin
  729. Result := Default;
  730. end;
  731. end.
  732. {
  733. $Log$
  734. Revision 1.3 2002-09-07 15:15:25 peter
  735. * old logs removed and tabs fixed
  736. }