winhlp32: Use explicit prototypes for the dll callbacks.
This commit is contained in:
parent
a54bd70bac
commit
e2d22db7b9
|
@ -158,23 +158,23 @@ static LONG CALLBACK WHD_API(LPSTR x, WORD xx, DWORD xxx)
|
|||
return 0;
|
||||
}
|
||||
|
||||
FARPROC Callbacks[] =
|
||||
const struct winhelp_callbacks Callbacks =
|
||||
{
|
||||
(FARPROC)WHD_GetFSError,
|
||||
(FARPROC)WHD_Open,
|
||||
(FARPROC)WHD_Close,
|
||||
(FARPROC)WHD_OpenBag,
|
||||
(FARPROC)WHD_CloseBag,
|
||||
(FARPROC)WHD_ReadBag,
|
||||
(FARPROC)WHD_TellBag,
|
||||
(FARPROC)WHD_SeekBag,
|
||||
(FARPROC)WHD_IsEofBag,
|
||||
(FARPROC)WHD_SizeBag,
|
||||
(FARPROC)WHD_Access,
|
||||
(FARPROC)WHD_LLInfoFromBag,
|
||||
(FARPROC)WHD_LLInfoFromFile,
|
||||
(FARPROC)WHD_Error,
|
||||
(FARPROC)WHD_ErrorString,
|
||||
(FARPROC)WHD_GetInfo,
|
||||
(FARPROC)WHD_API
|
||||
WHD_GetFSError,
|
||||
WHD_Open,
|
||||
WHD_Close,
|
||||
WHD_OpenBag,
|
||||
WHD_CloseBag,
|
||||
WHD_ReadBag,
|
||||
WHD_TellBag,
|
||||
WHD_SeekBag,
|
||||
WHD_IsEofBag,
|
||||
WHD_SizeBag,
|
||||
WHD_Access,
|
||||
WHD_LLInfoFromBag,
|
||||
WHD_LLInfoFromFile,
|
||||
WHD_Error,
|
||||
WHD_ErrorString,
|
||||
WHD_GetInfo,
|
||||
WHD_API
|
||||
};
|
||||
|
|
|
@ -735,7 +735,7 @@ static void CALLBACK MACRO_RegisterRoutine(LPCSTR dll_name, LPCSTR proc, LPCSTR
|
|||
dll->class = dll->handler ? (dll->handler)(DW_WHATMSG, 0, 0) : DC_NOMSG;
|
||||
WINE_TRACE("Got class %x for DLL %s\n", dll->class, dll_name);
|
||||
if (dll->class & DC_INITTERM) dll->handler(DW_INIT, 0, 0);
|
||||
if (dll->class & DC_CALLBACKS) dll->handler(DW_CALLBACKS, (DWORD)Callbacks, 0);
|
||||
if (dll->class & DC_CALLBACKS) dll->handler(DW_CALLBACKS, (LONG_PTR)&Callbacks, 0);
|
||||
}
|
||||
else WINE_WARN("OOM\n");
|
||||
}
|
||||
|
|
|
@ -115,7 +115,7 @@ typedef struct tagWinHelp
|
|||
#define DW_ACTIVATE 9
|
||||
#define DW_CALLBACKS 10
|
||||
|
||||
typedef long (CALLBACK *WINHELP_LDLLHandler)(WORD, LONG, LONG);
|
||||
typedef LONG (CALLBACK *WINHELP_LDLLHandler)(WORD, LONG_PTR, LONG_PTR);
|
||||
|
||||
typedef struct tagDll
|
||||
{
|
||||
|
@ -140,8 +140,28 @@ typedef struct
|
|||
HFONT hButtonFont;
|
||||
} WINHELP_GLOBALS;
|
||||
|
||||
extern const struct winhelp_callbacks
|
||||
{
|
||||
WORD (WINAPI *GetFSError)(void);
|
||||
HANDLE (WINAPI *HfsOpenSz)(LPSTR,BYTE);
|
||||
WORD (WINAPI *RcCloseHfs)(HANDLE);
|
||||
HANDLE (WINAPI *HfOpenHfs)(HANDLE,LPSTR,BYTE);
|
||||
HANDLE (WINAPI *RcCloseHf)(HANDLE);
|
||||
LONG (WINAPI *LcbReadHf)(HANDLE,BYTE*,LONG);
|
||||
LONG (WINAPI *LTellHf)(HANDLE);
|
||||
LONG (WINAPI *LSeekHf)(HANDLE,LONG,WORD);
|
||||
BOOL (WINAPI *FEofHf)(HANDLE);
|
||||
LONG (WINAPI *LcbSizeHf)(HANDLE);
|
||||
BOOL (WINAPI *FAccessHfs)(HANDLE,LPSTR,BYTE);
|
||||
WORD (WINAPI *RcLLInfoFromHf)(HANDLE,WORD,LPWORD,LPLONG,LPLONG);
|
||||
WORD (WINAPI *RcLLInfoFromHfs)(HANDLE,LPSTR,WORD,LPWORD,LPLONG,LPLONG);
|
||||
void (WINAPI *ErrorW)(int);
|
||||
void (WINAPI *ErrorSz)(LPSTR);
|
||||
ULONG_PTR (WINAPI *GetInfo)(WORD,HWND);
|
||||
LONG (WINAPI *API)(LPSTR,WORD,DWORD);
|
||||
} Callbacks;
|
||||
|
||||
extern WINHELP_GLOBALS Globals;
|
||||
extern FARPROC Callbacks[];
|
||||
|
||||
BOOL WINHELP_CreateHelpWindow(WINHELP_WNDPAGE*, int, BOOL);
|
||||
BOOL WINHELP_OpenHelpWindow(HLPFILE_PAGE* (*)(HLPFILE*, LONG, ULONG*),
|
||||
|
|
Loading…
Reference in New Issue