~ubuntu-branches/ubuntu/dapper/fpc/dapper

« back to all changes in this revision

Viewing changes to fcl/inc/registry.pp

  • Committer: Bazaar Package Importer
  • Author(s): Carlos Laviola
  • Date: 2001-08-29 23:15:17 UTC
  • Revision ID: james.westby@ubuntu.com-20010829231517-thxsp7ctuab584ia
Tags: upstream-1.0.4
ImportĀ upstreamĀ versionĀ 1.0.4

Show diffs side-by-side

added added

removed removed

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