Unit Hlpdll32 |
This header is a port of Microsoft's C header file for Help DLLs as published in the Help Applications Generator authoring guide (the "HAG"). It contains a number of additions based on discoveries by a number of authors, additional commentary and a critical correction to the definition of the HE_GETINFO function abstraction. This header may be used interchangeably for both 16 and 32 bit Help. Among those responsible for the additions, comments and corrections include Bernd Herd, Cub Lea, Jim Mischel, and Matthew Withopf. A few of Matthew's comments remain here untranslated, and additional info on some functions is available in the HAG docs (downloadable from Microsoft and www.shareware.com via a partfilename search on WHAG or WHAT6). Several versions of the WinHelp header file created for use with Pascal environments have been found to be faulty in some areas. This version has been fairly well tested with Delphi, Delphi 2 and Delphi 3 with baggage and embeddings. Cub Lea (9/97) *) {unit Hlpdll16;
Classes |
Functions |
GetCallBacks - GetCallBacks -- Copy function pointers from array to global function pointers.
Types |
FPtrs
HF
HFS
LPFN_ErrorSz
LPFN_ErrorW
LPFN_FAccessHfs
LPFN_FAPI
LPFN_FEofHf
LPFN_HfCreateFileHfs
LPFN_HfOpenHfs
LPFN_HfsCreateFileSys
LPFN_HfsOpenSz
LPFN_LcbReadHf
LPFN_LcbSizeHf
LPFN_LcbSizeHfs
LPFN_LcbWriteHf
LPFN_LGetInfo
LPFN_LSeekHf
LPFN_LTellHf
LPFN_RcAbandonHf
LPFN_RcCloseHf
LPFN_RcCloseHfs
LPFN_RcDestroyFileSys
LPFN_RcFlushHf
LPFN_RcLLInfoFromHf
LPFN_RcLLInfoFromHfs
LPFN_RcRenameFileHfs
LPFN_RcUnlinkFileHfs
ME
pEWData
pFPtrs
pME
pRenderInfo
QCI
QRI
RC
TEWData
TRenderInfo
Constants |
DC_Activate
DC_CallBacks
DC_InitTerm
DC_Jump
DC_MinMax
DW_Activate
DW_CallBacks
DW_ChgFile
DW_EndJump
DW_Init
DW_MinMax
DW_NotUsed
DW_Size
DW_StartJump
DW_Term
DW_Unknown1
DW_WhatMsg
EWM_AskPalette
EWM_FindNewpalette
EWM_QuerySize
EWM_Render
fFSOpenReadOnly
fFSOpenReadWrite
fFSReadOnly
fFSReadWrite
fwMERR_Abort
fwMERR_Continue
fwMERR_Retry
GI_BKColor
GI_CurrHWnd
GI_FGColor
GI_HFS
GI_HPath
GI_Instance
GI_MainHWnd
GI_Nothing
GI_TopicNo
HELP_GotoMark
HELP_JmpId
HELP_JumpHash
HELP_PopupHash
HELP_PopupId
HELP_SetContents
HE_API
HE_ErrorSz
HE_ErrorW
HE_FAccessHfs
HE_FEofHf
HE_GetInfo
HE_HfCreateFileHfs
HE_HfOpenHfs
HE_HfsCreateFileSys
HE_HfsOpenSz
HE_LcbReadHf
HE_LcbSizeHf
HE_LcbSizeHfs
HE_LcbWriteHf
HE_LSeekHf
HE_LTellHf
HE_NotUsed
HE_RcAbandonHf
HE_RcCloseHf
HE_RcCloseHfs
HE_RcDestroyFileSys
HE_RcFlushHf
HE_RcLLInfoFromHf
HE_RcLLInfoFromHfs
HE_RcRenameFileHfs
HE_RcUnlinkFileHfs
rcBadArg
rcBadHandle
rcBadVersion
rcDiskFull
rcExists
rcFailure
rcFileChange
rcInternal
rcInvalid
rcNoExists
rcNoFileHandles
rcNoPermission
rcOutOfMemory
rcReadError
rcSuccess
rcTooBig
rcUnimplemented
wERRS_BadDrive
wERRS_BadFile
wERRS_BadKeyWord
wERRS_BadPathSpec
wERRS_DialogBoxOOM
wERRS_DiskFull
wERRS_Export
wERRS_FNF
wERRS_FSReadWrite
wERRS_NoHelpPR
wERRS_NoHelpPS
wERRS_NoPrinter
wERRS_NoTopic
wERRS_OldFile
wERRS_OOM
wERRS_PathNotFound
wERRS_Print
wERRS_Virus
wERRS_WinClass
wFSSeekCur
wFSSeekEnd
wFSSeekSet
wLLDupFid
wLLNewFid
wLLSameFid
wMACRO_ERROR
wMERR_Error
wMERR_File
wMERR_Memory
wMERR_Message
wMERR_None
wMERR_Param
Variables |
ErrorSz
ErrorW
FAccessHfs
FAPI
FEofHf
HfCreateFileHfs
HfOpenHfs
HfsCreateFileSys
HfsOpenSz
LcbReadHf
LcbSizeHf
LcbSizeHfs
LcbWriteHf
LGetInfo
LSeekHf
LTellHf
RcAbandonHf
RcCloseHf
RcCloseHfs
RcDestroyFileSys
RcFlushHf
RcLLInfoFromHf
RcLLInfoFromHfs
RcRenameFileHfs
RcUnlinkFileHfs
Functions |
Types |
FPtrs = Array [HE_NotUsed..HE_RcDestroyFileSys] of Pointer;
HF = THandleHandle to a file system
HFS = THandleError return code
LPFN_ErrorSz = Procedure(lpstr: PChar)Retrieve last error by string
LPFN_ErrorW = Procedure(nError: Integer)Retrieve last error by RC value
LPFN_FAccessHfs = Function(fs: HFS; {handle of the open filesystem} szName: PChar; {name of the file queried} bFlags: Byte): {If 0 then R/W, if 2 then ReadOnly} BOOLDetermine access permissions for components of the helpfile's IFS
LPFN_FAPI = Function(qchHelp: PChar; {qchPath of helpfile} wCommand: Word; {HELP_[command]} ulData: Longint {Pointer to string (HELP_JUMP etc) or actual value to pass (HELP_CONTEXT etc} ): LongintThis is equivalent to a WinHelp call done internally
LPFN_FEofHf = Function(f: HF): {handle to the opened file} BOOLDetermine end-of-file bool for reading HFS
LPFN_HfCreateFileHfs = Function(fs: HFS; {handle to current filesystem} szName: PChar; {create new baggage file} wFlags: Word {creation mode (??)} ): WordCreate a new baggage file
LPFN_HfOpenHfs = Function(fs: HFS; {Handle to the filesystem} szName: PChar; {Name of specific file, uppercase} bFlags: Byte {If 0 then is read/write, if 2 then readonly} ): HFOpenFile equiv for Help internal filesystem
LPFN_HfsCreateFileSys = Function(szName: PChar; {name (??)} Var pb {pointer to parameter block} ) : WordwErr error code} {$IFDEF Win32
LPFN_HfsOpenSz = Function(sz: PChar; {Name of helpfile system} bFlags: Byte {If 0 then is read/write, if 2 then readonly} ): HFSEquivalent to our "Reset" function
LPFN_LcbReadHf = Function(f:HF; {handle of the opened file} Var qb; {variable pointer to the buffer which receives data, indicates current position in the pointer for blockread operations} lcb: Longint {pointer size in bytes} ): LongintBlockRead for Help IFS
LPFN_LcbSizeHf = Function(f: HF): {handle to the opened file} LongintRetrieve size of current open file
LPFN_LcbSizeHfs = Function(fs: HFS {handle to current filesystem} ): LongintTotal size of IFS
LPFN_LcbWriteHf = Function(f: HF; {handle to baggage file} Var qb; {address of buffer with data to write} lcb: Longint {length of the buffer} ): Longintwrite data to a baggaged file
LPFN_LGetInfo = Function(wItem: Cardinal; {Info to retrieve. List: { $01: hInstance of this WinHelp} { $02 HWnd of main window} { $03 HWnd of window making call} { $04 Handle to this helpfile's IFS} { $05 Foreground color} { $06 Background color} { $07 actual topic index number} { $08 Speicher-Handle } { $08 Pointer to qchPath for this helpfile} { $64 Special handle for unknown} { $65 ???} { $66 ???} { $67 PChar auf "MAIN"/"SECONDARY"} { $68 Makro in Bearbeitung ($0000/$0001)} wnd: Hwnd {windowhandle to query} ): LongintRetrieve specific info about the helpfile. NOTE: This function was NOT correctly defined in MS' own docs. Parameter order was reversed in the HAG documentation.
LPFN_LSeekHf = Function(f: HF; {handle to the opened file} lOffset: Longint; {offset from beginning of file} wOrigin: Word {seek mode: 0:from start, 1: From current pos. 2: From end} ): LongintFileSeek for Help IFS
LPFN_LTellHf = Function(f: HF {handle to the opened file} ): LongintRetrieve file's position in IFS
LPFN_RcAbandonHf = Function(fs: HFS {handle to current filesystem} ): WordDump the current file
LPFN_RcCloseHf = Function(f:HF {handle of opened file} ): RCCloseFile equivalent for Help IFS
LPFN_RcCloseHfs = Function(fs: HFS {Handle to the filesystem} ): RCEquivalent to our "Close" function
LPFN_RcDestroyFileSys = Function(szName: PChar {name (??)} ): WordwErr error code} {$IFDEF Win32
LPFN_RcFlushHf = Function(f: HF {handle to baggage file} ): Word
LPFN_RcLLInfoFromHf = Function(f: HF; wOption: Word; Var qfid: Word; Var qlBase,qlcb: Longint): RCRetrieve low-level info about open file
LPFN_RcLLInfoFromHfs=Function(fs:HFS; {handle to current filesystem} szName: PChar; {name of file, uppercase} wOption: Word; {0/1/2} Var qfid: Word; {file ID} Var qlBase: Longint; {offset of file in filesystem} qlcb: Longint): RCRetrieve data about a specific baggage file
LPFN_RcRenameFileHfs = Function(fs: HFS; {handle to current filesystem} szOldName: PChar; {old name of file} szNewName: PChar {new name of file} ): WordRename a baggage file
LPFN_RcUnlinkFileHfs = Function(fs : HFS; {handle to current filesystem} szName: PChar {name of file to erase} ): WordErase a baggage file
ME = record
fwFlags : Word;
wError : Word;
rgchError : Array [0..wMacro_Error-1] of Char;
end;
pEWData = ^TEWDataEmbedded Window create structure
pFPtrs = ^FPtrsHandle to a file system baggage file} {FPtrs is an array of pointers to functions.
pME = ^MEAllow the "retry" option
pRenderInfo = ^TRenderInfo
QCI = ^TEWData
QRI = ^TRenderInfoEmbedded window rendering info
RC = Word
TEWData = record
idMajVersion : Integer;
idMinVersion : Integer;
szFileName : PChar;
szAuthorData : PChar;
hfs : THandle;
coFore : LongInt;
coBack : Longint;
end;
TRenderInfo = record
Rect : TRect;
DC : hDC;
end;
Constants |
Variables |