Usually, you will search for a key word like the following:
procedure HelpSearch(sHelpName,sSearchKey:string);
var
pc:PChar;
begin
Application.HelpFile:=sHelpName;
pc:=StrAlloc(100);
StrPCopy(pc,sSearchKey);
Application.HelpCommand(HELP_PARTIALKEY, LongInt(pc));
StrDispose(pc)
end;
Instead, you could use following code:
procedure HelpSearch(sHelpName,sSearchKey:string);
var
pc:array[0..99] of char;
begin
Application.HelpFile:=sHelpName;
StrPCopy(pc,sSearchKey);
Application.HelpCommand(HELP_PARTIALKEY, LongInt(@pc))
end;
The important things is the low bounds of array must been 0.