2 * Win16 built-in DLLs definitions
4 * Copyright 1999 Ulrich Weigand
7 #ifndef __WINE_BUILTIN16_H
8 #define __WINE_BUILTIN16_H
16 extern void RELAY_Unimplemented16(void);
18 extern WORD
CallFrom16Word();
19 extern LONG
CallFrom16Long();
20 extern void CallFrom16Register();
21 extern void CallFrom16Thunk();
23 extern WORD CALLBACK
CallTo16Word( FARPROC16 target
, INT nArgs
);
24 extern LONG CALLBACK
CallTo16Long( FARPROC16 target
, INT nArgs
);
25 extern LONG CALLBACK
CallTo16RegisterShort( const struct _CONTEXT86
*context
, INT nArgs
);
26 extern LONG CALLBACK
CallTo16RegisterLong ( const struct _CONTEXT86
*context
, INT nArgs
);
32 WORD pushw_bp
; /* pushw %bp */
33 BYTE pushl
; /* pushl $target */
35 WORD call
; /* call CALLFROM16 */
39 #define EP(target, offset) { 0x5566, 0x68, (target), 0xe866, (WORD) (offset) }
43 BYTE pushl
; /* pushl $relay */
45 BYTE lcall
; /* lcall __FLATCS__:glue */
48 BYTE prefix
; /* lret $nArgs */
51 LPCSTR profile
; /* profile string */
54 #define CF16_WORD( relay, nArgs, profile ) \
55 { 0x68, (DWORD)(relay), \
56 0x9a, (DWORD)CallFrom16Word, __FLATCS__, \
57 0x66, (nArgs)? 0xca : 0xcb, (nArgs)? (nArgs) : 0x9090, \
60 #define CF16_LONG( relay, nArgs, profile ) \
61 { 0x68, (DWORD)(relay), \
62 0x9a, (DWORD)CallFrom16Long, __FLATCS__, \
63 0x66, (nArgs)? 0xca : 0xcb, (nArgs)? (nArgs) : 0x9090, \
66 #define CF16_REGS( relay, nArgs, profile ) \
67 { 0x68, (DWORD)(relay), \
68 0x9a, (DWORD)CallFrom16Register, __FLATCS__, \
69 0x66, (nArgs)? 0xca : 0xcb, (nArgs)? (nArgs) : 0x9090, \
76 const char *name
; /* DLL name */
77 void *module_start
; /* 32-bit address of the module data */
78 int module_size
; /* Size of the module data */
79 const BYTE
*code_start
; /* 32-bit address of DLL code */
80 const BYTE
*data_start
; /* 32-bit address of DLL data */
81 const void *rsrc
; /* resources data */
82 } BUILTIN16_DESCRIPTOR
;
84 extern BOOL
BUILTIN_Init(void);
85 extern HMODULE16
BUILTIN_LoadModule( LPCSTR name
);
86 extern LPCSTR
BUILTIN_GetEntryPoint16( struct _STACK16FRAME
*frame
, LPSTR name
, WORD
*pOrd
);
87 extern void BUILTIN_RegisterDLL( const BUILTIN16_DESCRIPTOR
*descr
);
89 #endif /* __WINE_BUILTIN16_H */