2 * Win16 built-in DLLs definitions
4 * Copyright 1999 Ulrich Weigand
7 #ifndef __WINE_BUILTIN16_H
8 #define __WINE_BUILTIN16_H
16 extern BOOL
BUILTIN_Init(void);
17 extern HMODULE16
BUILTIN_LoadModule( LPCSTR name
, BOOL force
);
18 extern LPCSTR
BUILTIN_GetEntryPoint16( struct _STACK16FRAME
*frame
, LPSTR name
, WORD
*pOrd
);
20 extern void RELAY_Unimplemented16(void);
22 extern WORD
CallFrom16Word();
23 extern LONG
CallFrom16Long();
24 extern void CallFrom16Register();
25 extern void CallFrom16Thunk();
27 extern WORD CALLBACK
CallTo16Word( FARPROC16 target
, INT nArgs
);
28 extern LONG CALLBACK
CallTo16Long( FARPROC16 target
, INT nArgs
);
29 extern LONG CALLBACK
CallTo16RegisterShort( const struct _CONTEXT86
*context
, INT nArgs
);
30 extern LONG CALLBACK
CallTo16RegisterLong ( const struct _CONTEXT86
*context
, INT nArgs
);
36 WORD pushw_bp
; /* pushw %bp */
37 BYTE pushl
; /* pushl $target */
39 WORD call
; /* call CALLFROM16 */
43 #define EP(target, offset) { 0x5566, 0x68, (target), 0xe866, (WORD) (offset) }
47 BYTE pushl
; /* pushl $relay */
49 BYTE lcall
; /* lcall __FLATCS__:glue */
52 BYTE prefix
; /* lret $nArgs */
55 LPCSTR profile
; /* profile string */
58 #define CF16_WORD( relay, nArgs, profile ) \
59 { 0x68, (DWORD)(relay), \
60 0x9a, (DWORD)CallFrom16Word, __FLATCS__, \
61 0x66, (nArgs)? 0xca : 0xcb, (nArgs)? (nArgs) : 0x9090, \
64 #define CF16_LONG( relay, nArgs, profile ) \
65 { 0x68, (DWORD)(relay), \
66 0x9a, (DWORD)CallFrom16Long, __FLATCS__, \
67 0x66, (nArgs)? 0xca : 0xcb, (nArgs)? (nArgs) : 0x9090, \
70 #define CF16_REGS( relay, nArgs, profile ) \
71 { 0x68, (DWORD)(relay), \
72 0x9a, (DWORD)CallFrom16Register, __FLATCS__, \
73 0x66, (nArgs)? 0xca : 0xcb, (nArgs)? (nArgs) : 0x9090, \
80 const char *name
; /* DLL name */
81 void *module_start
; /* 32-bit address of the module data */
82 int module_size
; /* Size of the module data */
83 const BYTE
*code_start
; /* 32-bit address of DLL code */
84 const BYTE
*data_start
; /* 32-bit address of DLL data */
88 #endif /* __WINE_BUILTIN16_H */