diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/HelpFile.pas | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/HelpFile.pas b/src/HelpFile.pas index 718577a3..b3ee7317 100644 --- a/src/HelpFile.pas +++ b/src/HelpFile.pas @@ -51,6 +51,9 @@ type THelpFile = class(TObject) + private + function GetStringResourceIDCount: integer; + function GetNumericResourceIDCount: integer; protected _Filename : string; _FileSize : longint; @@ -130,6 +133,8 @@ type property Topics[ Index: longint ]: TTopic read GetTopic; property TopicList: TList read _Topics; property TopicCount: longint read GetTopicCount; + property StringResourceIDCount: integer read GetStringResourceIDCount; + property NumericResourceIDCount: integer read GetNumericResourceIDCount; property Index: TIndex read GetIndex; property Filename: string read _FileName; @@ -344,6 +349,16 @@ Begin Result := Topic.HelpFile as THelpFile; end; +function THelpFile.GetStringResourceIDCount: integer; +begin + Result := _pHeader^.nname; +end; + +function THelpFile.GetNumericResourceIDCount: integer; +begin + Result := _pHeader^.nres; +end; + procedure THelpFile.InitMembers; begin _SlotDataSize := 0; @@ -743,9 +758,11 @@ begin exit; if _pResourceData = nil then + begin ReadFileBlock( _pResourceData, _pHeader^.resstart, - _pHeader^.nres * sizeof( uint16 ) * 2 ); // list of IDs, list of topics + (_pHeader^.nres * sizeof( uint16 )) * 2 ); // list of IDs, list of topics + end; pResourceIDs := _pResourceData; pTopicIndices := _pResourceData |